Trigger after sunset, but 30min before sunset ;-)

Hi guys

I have the following requirement implemented:

  1. 30min before Sunset: I want to enable a few lights when somebody is at home and it is 30min before sunset.
  2. After Sunset: When the first person comes home and it is after sunset, I want to enable the same lights.

The problem now is the 30min before sunset for the second part that is missing – but I have to enable the flow 30min before sunset (after sunset) as it is often too dark at sunset. During this 30min period before sunset and sunset, today nothing happens if the first person comes home. There is no “it’s after sunset but should start 30min before” trigger, I hope it is clear ;-). Any inputs how to workaround the issue? I need to trigger if it is after sunset, but it should start 30min before sunset instead of at sunset…

Or to sum it up, how can I trigger if it is between 30min before sunset and eg. 23:00?

Maybe you can enter -30 (minus 30 minutes)?

Where shall I enter -30? The “'it’s after sunset” has no delay option… and the time between option doesn’t work as I can’t select sunset/sunrise there. I just see two sunset/sunrise triggers without delay

Check out this app. It will solve your problem.

Sun Events is an app the has several triggers to certain positions of the sun. It make use of suncalc from ‘Vladimir Agafonkin’. The following triggers are possible:

  • sunrise (top edge of the sun appears on the horizon)
  • sunrise ends (bottom edge of the sun touches the horizon)
  • morning golden hour (soft light, best time for photography) ends
  • solar noon (sun is in the highest position)
  • goldenHour (evening golden hour starts)
  • sunset starts (bottom edge of the sun touches the horizon)
  • sunset (sun disappears below the horizon, evening civil twilight starts)
  • dusk (evening nautical twilight starts)
  • nautical dusk (evening astronomical twilight starts)
  • night starts (dark enough for astronomical observations)
  • nadir (darkest moment of the night, sun is in the lowest position)
  • night ends (morning astronomical twilight starts)
  • nautical dawn (morning nautical twilight starts)
  • dawn (morning nautical twilight ends, morning civil twilight starts)
  • Options to put your own set/rise position of the sun

On every card you can fill in a offset in minutes between -60 and 60. This to delay or speed-up for example the sunset time.

Sorry. This is not a trigger but a condition, you asked for a trigger.

thank you guys, I was not aware of the “Sonnenereignisse” App. I’ll try it out! Perfect