I have the following trigger which works for an actual numeric state of a sensor to go above 100. Is there a way to make a trigger so that it will fire only if the state increases or decreases by 9? So I don’t care what the actual state is, but only if it moves up or down in this range. This sensor is a scale on my bed, and I want to know if the 9 lb cat or the 11 lb cat just got on or off the bed.
Yes. Just set a trigger for entity state.
Then use a condition to check the difference between {{ trigger.from_state.state }}
and {{ trigger.to_state.state }}
Because otherwise you will calculate the difference between 2 strings and then convert to a float. Convert each value to float first then calculate the difference
If you just want a value higher than [say] 9, regardless of whether it’s +9 or -9, then enclose the whole lot in an absolute filter
I believe is abs(float) > 9