From 7e1c8d359d3e950ed2727f7a2bf2c84a054721a6 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Wed, 4 Feb 2026 14:31:08 -0500 Subject: Restore grow light automations, remove SAD lamp --- hostnix/elmo/home-assistant.nix | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix index 20ae957..bb6fd89 100644 --- a/hostnix/elmo/home-assistant.nix +++ b/hostnix/elmo/home-assistant.nix @@ -52,10 +52,6 @@ target.entity_id = entity; }; }; - - entity = { - sad_lamp = "switch.wakko"; - }; }; in @@ -454,7 +450,6 @@ }; action = [ (ha.action.off "light.panel_light") - (ha.action.off ha.entity.sad_lamp) (ha.action.off "climate.bedroom_cool") (ha.action.off "climate.air_conditioner_1") ]; @@ -483,7 +478,6 @@ ]; action = [ (ha.action.on "light.panel_light") - (ha.action.on ha.entity.sad_lamp) ]; } @@ -571,6 +565,32 @@ (ha.action.off "climate.bedroom_cool") ]; } + { + alias = "Grow light morning"; + # TODO make configurable (snooze) + trigger = [ (ha.trigger.at "09:00") ]; + condition = [ + { + condition = "zone"; + entity_id = "person.joe"; + zone = "zone.home"; + } + ]; + action = [ + (ha.action.on "light.grow_light") + (ha.action.on "switch.wakko") + # { + # service = "fan.set_percentage"; + # target.entity_id = "fan.core_200s"; + # data.percentage = 100; + # } + ]; + } + { + alias = "Grow light night"; + trigger = [ (ha.trigger.at "20:00") ]; + action = [ (ha.action.off "switch.wakko") ]; + } (button "binary_sensor.bedroom_button_1" [ (ha.action.toggle "light.panel_light") @@ -581,7 +601,7 @@ } ]) (button "binary_sensor.bedroom_button_2" - (ha.action.toggle ha.entity.sad_lamp)) + (ha.action.toggle "switch.wakko")) { alias = "Fridge door ajar"; @@ -599,10 +619,8 @@ data.message = "Check fridge door"; } (ha.action.toggle "light.panel_light") - (ha.action.toggle ha.entity.sad_lamp) { delay.milliseconds = 500; } (ha.action.toggle "light.panel_light") - (ha.action.toggle ha.entity.sad_lamp) ]; } -- cgit v1.3.1