Best way to make timed bedtime scene

Hello all,

I want to create a scene for when I go to bed. I want all the lights to turn off immediately with the exception of the hallway and landing lights, which should come on and then turn off after 5 minutes. I’m not sure the best way to create the automation/script/scene for this, what’s the best method?

Thanks!

You can write an automation to do this or a script, they both follow the same basic syntax. The automation is trigged based of a time or another sensor/state in HA. The script you would need to fire manually.

Write the automation script to turn off your lights and turn on your hallway and landing lights. Then insert a delay for 5 minutes and turn off the hallway and landing lights.

Delays are described here: