From c78f5a4a6dc5dac15c15fcbeb0bfee0bedd87bec Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Sun, 1 Nov 2026 12:48:52 +0200 Subject: [PATCH] Kids light on a transition --- src/HomeAssistant/Controller/Children.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/HomeAssistant/Controller/Children.hs b/src/HomeAssistant/Controller/Children.hs index 02eaae6..371769c 100644 --- a/src/HomeAssistant/Controller/Children.hs +++ b/src/HomeAssistant/Controller/Children.hs @@ -85,7 +85,9 @@ schoolLightController = lightsOn <> lightsOff lightsOn :: HASS a () lightsOn = foldMap atTime timersOn - >>> AFRP.onEvent (callService "Lights on" (light [AreaId "lasten_makuuhuone"] (On def{lightBrightness=Just $ BrightnessPercent 100} ))) + >>> AFRP.onEvent (callService "Lights on" lights) + where + lights = light [AreaId "lasten_makuuhuone"] (On def{lightBrightness=Just (BrightnessPercent 100), lightTransition = Just 5} ) lightsOff :: HASS a () lightsOff = foldMap atTime timersOff