Dim a light after a certain time

Hi, I have created an automation where the trigger is the switching on of a shelly dimmer, in the conditions I set before 6:00 am and after 20:00 pm, and in the action the brightness adjustment. it doesn’t work though. even if I disable the conditions.

Any tips?

You need to post the yaml of the automation before anyone can help.

1 Like

Correctly formatted for the forum too please.

where i can find the yaml?

hi, this is the yalm

a correction on what I wrote. the automation works but it takes several seconds (about 5) before it turns down the brightness

alias: Accensione luce (Duplica)
  description: ''
  trigger:
  - platform: device
    type: turned_on
    device_id: b045b57cf22bd33af46589181f310837
    entity_id: light.shellydimmer_d484f9
    domain: light
  condition:
  - condition: time
    after: '20:00:00'
    before: 07:00:00
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
    enabled: false
  action:
  - type: turn_on
    device_id: b045b57cf22bd33af46589181f310837
    entity_id: light.shellydimmer_d484f9
    domain: light
    brightness_pct: 27
  mode: single

Please format your pasted config as per the link I posted.

It looks ok and should work. I recreated the automation with a light I have and it worked in 0.07 seconds.

If you look at the timestamps in the debug how long is it taking to run from when you trigger it.
Debug is here.
image