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: ""
  - platform: sun
    event: sunset
    offset: " -00:25:00"
  - platform: time
    at: "21:00:00"
  - service: light.turn_on
      entity_id: light.sunset_lights_on
      brightness_pct: "{{ iif(trigger.platform == 'sun', 100, 50) }}"
      transition: 10
mode: single```

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


Not sure if this is it. But, looking at

Sun - Home Assistant (

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