#Automation between a certain time

1 messages · Page 1 of 1 (latest)

eager jasper
#

I'm quite sure I'm misinterpreting how to use automations

I have an automation where I want to keep switch in on mode between a certain time.

I have added

When time equals: At time XX.XX
Turned on , with the device I want to turn on and for (the amount of hours I want it to be on)

The automation did switch on but it did not trigger the switch
The automation did not switch off

Please see screenshot

tepid echo
#

the second part is also a condition

#

there's no simple way to say it should be on for some amount of time

#

but you can have one action that sets it on

#

then one that waits for a certain amount of time

#

and then a third one that turns it off

#

and they will be executed one afte rantoher

steady cairn
#

Like @tepid echo said, there is no easy when so tell the light to stay on for some amount of time. Your "When" should be the time you want your light to go on. The turning on and off of the light should be under "Then do" see the screenshot

#

The disadvantage of this is that when something happens with Home Assistant or you reboot your system the automation get interrupted and your light will not turn off. To prevent this from happening, you can create 2 automations, 1 to turn the light on at a specific time and 1 to turn it off at a time. Or to make it more complicated create 1 automation with multiple triggers.

eager jasper
#

Thanks, will have a look tomorrow or wednesday

steady cairn
#

The complicated solution

eager jasper