Simple Light on 45 minutes before sunset

I have been trying to do this for for over a week, I have tried several different configurations from here, with no luck. Not sure what I’m doing wrong, I just want my living room light to come on about 45 minutes before sunset. This is what I tried last

automation:
  trigger:
    platform: sun
    event: sunset
    offset: "-00:45:00"
  action:
    service: homeassistant.turn_on
    entity_id: light.livingroom_lamp

Thanks

last time I played with this I did …

offset: -00:30

Here’s one straight from my yaml. What do you see when you check the states dev tool for “last_triggered”?

- alias: Turn on evening indoor lights
  trigger:
    - platform: sun
      event: sunset
      offset: "-01:30:00"
  action:
    - service: scene.turn_on
      entity_id: scene.default_indoor_evening
    - service: notify.scott_notifier
      data: 
        message: "HA set the evening indoor lights"

@ih8gates I just checked the last trigger says 3 hours ago, but it never came on. today was the first time it said it was triggered.

Edit: i just notice i have a typo on my config so it my work, is there any way of checking it or do I have to wait until tomorrow at sunset, the typo was in this last config.

Add the automation to your front end. Click on the automation name and it will pop up a box. In the lower left of that box is “trigger” which will trigger your automation. Note that this ignores any conditions and just executes the actions. A good way to test if your actions are set correctly.

Adding them to the front end lets you turn them on and off manually also. Handy depending on the type of automation.

OK Thanks guys it works now. The typo that I had was actually in my hue app all is great for now. :slight_smile:

Thank you everyone ALL works great and right on time.