Sun noon trigger

Hi guys

I’m trying to configure an automation that is triggered at solar noon. I can’t for the life of me figure out what the trigger should be configured as. My current thinking is to monitor the state change of the sun rising attribute from true to false but I can’t get a working config for that. Can anyone help me out?

Thanks

trigger:
- platform: template
  value_template: "{{ is_state_attr('sun.sun','rising',False) }}"
1 Like

Thanks Tinkerer, I’ll give it a try.

Or Trigger on : -

"{{ as_timestamp(state_attr('sun.sun', 'next_noon')) | timestamp_custom('%H:%M') == states('sensor.time') }}"

Though sidereal changes may mean you get two triggers some days eg. (say) one at 12:23 and another at 12:25 as the next_noon time changes to tomorrows one second after it happens but this also depends on if you are approaching or departing an equinox, I’ve never seen a 2 minute gap (a one minute gap wouldn’t trigger) but I suppose it depends on your lattitute.

Having said that if you are near north south poles you will get a “noon flag” even if the sun hasn’t risen.
That’s one for Tom_I to think about
:rofl:

I’ve never seen a double condition before (or just not recognised it as such if I had)
Thanks For That !
:beers:

Edit: your template is also much shorter !

1 Like

This works great thank you!

Hi all,

I know this topic has not been viewed or reacted to for quite some time but my question relates to the topic here.

For solar energy purposes I like to keep track of the highest point of the sun at my latitude for a given day. I have an app for that but recently I also figured out with help from a savvy user here how to get a sensor from template and show the same thing in home assistant dashboard (formally known as Lovelace frontend ;-))

However as one day past to the next I was expecting to see a change in the sensor in home assistant as in my app the the noon time changed by one minute. Nevertheless the time noon time in home assistant remains the same as it was yesterday.

Does anyone know why that it is?