I’m trying to create a template that will move on at a certain time. This is for an away mode. Essentially, I want the script to START depending on the amount of light from a sensor, but I don’t want lights to start turning off until it’s around the time I usually go to bed. I’m doing this from a script…Anyone know how to do this? This is what I have, but I don’t think it would actually work…
vacation:
alias: Vacation
sequence:
- delay: 00:05:00
- service: switch.turn_on
data:
entity_id: switch.office_light
- delay: 00:02:12
- service: light.turn_on
data:
entity_id: light.dining_room_lamp
brightness: 250
#### this one ####
- wait_template: {% if is_state('now().hour', '23') and if is_state('now().minute', '45') %}
- service: light.turn_on
data:
entity_id: light.bedroom_light
- delay: 00:21:23
- service: light.turn_off
data:
entity_id: group.all_lights
- service: switch.turn_off
data:
entity_id: group.all_switches