Diagrams
This commit is contained in:
1 parent
022342af32
commit
617bd255ff
10 files changed
+124
-71
No files matched your search
@@ -24,8 +24,8 @@ hallwayLightsController = proc x -> do
|
||||
traceEvent -< ev
|
||||
case ev of
|
||||
-- The lights entity is a "group of lights" in hass
|
||||
Event LightingOn | lightsAllowed now -> callServiceDyn (light [EntityId "light.hallway_lights"]) -< On def
|
||||
Event LightingOff -> callServiceDyn (light [EntityId "light.hallway_lights"]) -< Off
|
||||
Event LightingOn | lightsAllowed now -> callServiceDyn "Lights on" (light [EntityId "light.hallway_lights"]) -< On def
|
||||
Event LightingOff -> callServiceDyn "Lights off" (light [EntityId "light.hallway_lights"]) -< Off
|
||||
_ -> returnA -< ()
|
||||
where
|
||||
lightsAllowed (LocalTime _ tod) = not (tod > TimeOfDay 1 45 0 && tod < TimeOfDay 5 0 0)
|
||||
Reference in new issue
Block a user