i want to make an automation for a dimmer on my sons room. When he goes to bed and turns of the dimmer/light the light should go to eg 20% and not off.
I made an automation with trigger to off. But now the lights first go off and then turns on to 20%. Is it possible to dim directly to 20% and turn off first ?
- id: joris_lamp_to_20percent
alias: Joris dimmer naar 20%
trigger:
platform: state
entity_id: light.joris
to: 'off'
condition:
condition: time
after: '19:00:00'
before: '21:0:00'
action:
- data:
brightness: 30
entity_id: light.joris
transition: 60
service: light.turn_on