Can anyone help me with this sunset automation

had an automation set up to turns the lights on at sunset and dim at 9- worked fine

I wanted to get the automation to come on earlier - 25mins before sunset, so followed the offset rule.

now its doing nothing,

current code is

description: ""
trigger:
  - platform: sun
    event: sunset
    offset: " -00:25:00"
  - platform: time
    at: "21:00:00"
action:
  - service: light.turn_on
    target:
      entity_id: light.sunset_lights_on
    data:
      brightness_pct: "{{ iif(trigger.platform == 'sun', 100, 50) }}"
      transition: 10
mode: single```

the only bit ive changed is the offset bit....

advice?

Not sure if this is it. But, looking at

Sun - Home Assistant (home-assistant.io)

The example does not have a space inside the quotes in the offset like you do.

1 Like

You have a leading space before the actual offset.

Edit: Didn’t see @jeffcrum post. Ha

1 Like