Skip to content

Trigger for Solar Noon #742

Answered by craigbarratt
AlexHuebi asked this question in Q&A
Jul 28, 2025 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

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):

@state_trigger("float(sun.sun.old.azimuth) < 180 <= float(sun.sun.azimuth)")

azimuth only updates every couple of minutes, so it won't be exact.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ALERTua
Comment options

@AlexHuebi
Comment options

@craigbarratt
Comment options

Answer selected by AlexHuebi
@AlexHuebi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants