Add the ability to specify Sun Angle with "sunrise" or "sunset" triggers

The current “sun” trigger for automations is limited to the events “sunrise” and “sunset” with an offset. It would be benefitial to be able to supply a desired sun angle instead of “sunrise” or “sunset”.

There currently exists work around to get this behaviour (via the solar_angle or elevation attribute of the sun) however this has some shortcomings ( Solar angle or sunrise/sunset? ) it would be nice to have it built in and easily accessable

(Note: the FHEM module SUNRISE_EL https://wiki.fhem.de/wiki/SUNRISE_EL provides a nice way to reference target solar angles - however since HA already has the sun automation trigger platform it would probably be nice to add this functionality to the “sun” trigger)

What is wrong with using the elevation of the sun?

1 Like
  1. It does not work correctly when HA is restarted (see Solar angle or sunrise/sunset? as referenced in my starting post or Sun elevation trigger not working)
  2. It is non obvious - if the sun is such a prominent trigger platform it should be able to provide more than just non configurable sunrise and sunset events.

frz,
I understand your point but this is just the same for any arbitrary multi-state requirement.
I have time of day states for light levels (3 off) and heating times (user configurable and 5 off (which are different weekday/weekend))
From a restart, how is the system to know what segment it is supposed to be in ?
Until the next trigger occurs or you (having restarted HA) select it ?
If I think it important, I will select the segment, if not it just goes to the default till the next trigger which is always less than 10 hours, so I don’t lose out much.
Mutt