SUN : please add dawn and dusk as trigger options (next to sunrise/sunset)

Have you thought about using the elevation level of the sun? It is, in my experience, better to handle. I have a little input_number helper, where I can change the value of the elevation level. Works like a charme. :slight_smile:

In my case, taking my living situation into account (second floor, west side), it is “-5” in winter, and “-13” in summer. For me that works well, as long as I can’t find a good lux sensor that is working with my setup. :slight_smile:

1 Like

So I just edit my existing sun trigger from:

platform: sun
event: sunrise
offset: 0

To:

platform: time
at: sensor.sun_next_dawn

Is that correct, or do I need to delete the existing Sun trigger and add another one first? Just asking because last time I just edited the sun trigger directly and tried some code it did nothing, even while HA did not complain about any errors in the code.

After doing the edit, the trigger did change to this:

EDIT: It works! Thank you!

I think this is not solved at all.

This system is kind of counter intuitive.
You have the entity sun, with only to events: sunset and sunrise, which you can use with delay.

Unless you look in forums, etc, you may not discover that “time” contains more sun parameters, which are not part of sun.whatever, you have to go to “time” and trigger with a certain variable “sensor.sun_whatever” , but you cannot add a delay.
Aren’t all those sun/earth positions events as any sunset? Or full moon? Or equinox?

Also:

  • Most home automations are light/power related.
  • Sun powered installation proliferation is “becoming mainstrream” and usually implies several new automations to save power.
  • The second derivative is: trigger stuff based on sun position + something else (power, climate, light, etc.)

Sun based events, triggers and automations are the norm in most cases.

Why is so “difficult” to use sun as reference for automations?

Please revise how sun events and position are integrated and please consider it as a main-core feature of homeassistant (not relying in third party scripts/templates)

Please enumerate what you’d actually want.
Personally, I actually do not see any need for anything else than the exact position of the sun in my sky, i.e. elevation and azimuth. All the rest is basically derived from that, i.e. times when the sun will have a specific elevation.

Its very simple, among triggers there is sun right? I think both sun and moon should be there with their respective events. Moonlight its a usefull trigger as well.

In the case of sun, all the relevant positions should be available, not only sunrise and sunset:

Beucase there is sun.two_positions easy to offset
and sensor.sun_whatever_position, not so easy to offset

I think that is not consistent, thats all.
What is the simple way to trigger something from noon -1h or from noon +1h hour every day?
Or from sunset-30min to noon-30min?

And I mean solar noon, to be consistent over the whole year. Its the solar position that matters, not if its 12 o’clock (…) as some suggested in other topics.