i know how to set alert to phone when my value is below or above a threshold.
now, now can i set up automation to alert me when something changes by 1000+?
for instant, 9000 to 7000, or when 7000 go to 10000?
You mean in one jump?
trigger:
- platform: state
entity_id: sensor.my_sensor
condition:
- condition: template
value_template: "{{ trigger.to_state.state|float >= trigger.from_state.state|float + 1000 }}"
action:
- ACTION STUFF HERE
If the value increases in two steps of 999, this will not trigger.
looks like this code is for increasing correct?
if i want to set alert for decreasing, then change the code from “+ 1000” to - 1000?
And <=
too.