Events: State challenges

I have made a very simple automation where I use the “Events: State” node to check the entity id “sun.sun” and then after that a “switch” node that checks whether the sun is above or below horizon. After the switch node two “call service” node is added that sends a message with the text “Above horizon” or “Below horizon”. It works fine except I get the messages each minute.

I would have expected the “Events: state” node only triggered something when there was a change -meaning sun.sun would go from below to above or vice versa - not triggering every minute despite no changes?

I had the same problem, I solved it by inserting the rbe node and setting it to “block unless the value changes”.

Hope this helps.

Thanks, I’ll try to do that. Played around a bit and it is only sun.sun that updates every minute so it seems like a good work around.