I'm looking to figure out how to trigger and automation when a sensor increases by X aver an hour.
For example if the humidity changes from 45% to 55% over an hour I want it to trigger, but not if it goes from 45% to 50% in that hour. (I know how to set an automation to trigger if it goes over a threshold value ala I never want it to be above 70%).
Here's my current automation:
triggers:
- trigger: state
entity_id: sensor.humidity_average
conditions:
- condition: template
value_template: "{{ trigger.to_state.state - trigger.from_state.state|int > 1}}"