Store a custom snapshot of lights
This commit is contained in:
@@ -8,6 +8,7 @@ import qualified AFRP
|
||||
import Data.Aeson (Value)
|
||||
import Control.Arrow ((>>>), Arrow (..), returnA)
|
||||
import Data.Time (LocalTime(..), TimeOfDay (..))
|
||||
import Data.Default (def)
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ hallwayLightsController = proc x -> do
|
||||
traceEvent -< ev
|
||||
case ev of
|
||||
-- The lights entity is a "group of lights" in hass
|
||||
Event LightsOn | lightsAllowed now -> callServiceDyn (light [EntityId "light.hallway_lights"]) -< On Nothing
|
||||
Event LightsOn | lightsAllowed now -> callServiceDyn (light [EntityId "light.hallway_lights"]) -< On def
|
||||
Event LightsOff -> callServiceDyn (light [EntityId "light.hallway_lights"]) -< Off
|
||||
_ -> returnA -< ()
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user