Prevent dimmer to go off but to eg 20%

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

I don’t think so, you also have to bear in mind that the event you are triggering on is the light switch off (i.e. it’s already happened)
How about you buy a scene controller instead. Have it set a scene where that light is at 20% ?