Hi,
I’ve tried various attempts to get the wait_template working in this script that turns all my house lights on a various light reading levels but no luck.
Could anyone advise on how i accomplish this please ?
house_lights_on:
alias: Script House Lights On
sequence:
- data:
brightness: 255
color_temp: 370
transition: 60
entity_id: light.hall_table
service_template: light.turn_on
- wait_template: '{{ states.sensor.family_room_sensor_light_level.value|int < 115 }}'
- data:
brightness: 128
color_temp: 370
transition: 60
entity_id: light.tv_table
service_template: light.turn_on
- wait_template: '{{ states.sensor.family_room_sensor_light_level.value|int < 65 }}'
- data:
brightness: 255
color_temp: 370
transition: 60
entity_id: light.piano, light.desk, light.play_room_tv, light.breakfast_bar
service_template: light.turn_on
- data:
brightness: 255
color_temp: 370
transition: 60
entity_id: light.office
service_template: light.turn_on
- wait_template: '{{ states.sun.sun.attributes.elevation < -2 }}'
- data:
brightness: 255
color_temp: 370
transition: 30
entity_id: light.front_door
service_template: light.turn_on
- condition: state
entity_id: sensor.movie_lights_on_off
state: 'off'
- entity_id: switch.07371450840d8e42ead6_2
service_template: switch.turn_on