Weather trigger activate when no change occurs

Hello everyone.
I created an automation triggering the state of the weather object, by using:
‘’’
entity_id: weather.my_home
platform: state
‘’’

It works great but sometimes the automation is triggered even if no changes occur. In other words, if the weather state were sunny and turns to partlycloudy I expect the automation to be activated, but sometimes the weather is sunny, it remains sunny and I still have the automation triggered.

Would you have any suggestion to avoid this? Or to set a condition to filter these situations?

Thansk in advance

The state trigger triggers on every state change also if an attribute changes.

…and one solution to prevent triggering on state attribute changes is using this condition:

- condition: template
  value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
2 Likes

Perfect, thank you Tediore