Trigger for Solar Noon #742
-
Hi there, |
Beta Was this translation helpful? Give feedback.
Answered by
craigbarratt
Jul 28, 2025
Replies: 1 comment 4 replies
-
The sun.sun entity has an azimuth attribute. Solar noon happens just around an azimuth of 180 every day. So you can do a trigger based on that. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is those are ISO format timestamps, which as you noticed pyscript can't parse, unless you extract just the time of day. @dbsdbs93 proposed a good solution. To trigger once when the azimuth crosses 180 you could do this (untested):
azimuth
only updates every couple of minutes, so it won't be exact.