Hi All
I would love some help with simplifying the below code which dims my led light strip in my room so that it is at minimum brightness for the next morning when another similar automation brightens the lights gradually to wake me up. It works fine but takes up too many lines in my automations.yaml. I am not a very good programmer (electronics is my expertise) so I am appealing to you helpful and enthusiastic people out there. Thanks in advance.
- id: '1525515644688'
alias: Go to Sleep Lights
trigger:
platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d0001ae6c66
click_type: single
condition: []
action:
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom_level
service: switch.turn_off
- delay:
seconds: 0.5
- data:
entity_id: switch.light_bedroom
service: switch.turn_off