Trigger when pass through a range


I have an odd trigger request for help. I have a sensor that displays number in values. Let’s call it sensor.number

I would like to trigger an automation when it’s value passes from below -0.05 and crosses through to above 0.5

With …

platform: numeric_state
entity_id: sensor.number
above: 0.5

… it would trigger if it went from 0.0 up to 0.5, which would not work for my purposes.

Any ideas?

You’d trigger with above: 0.05 and then use a wait template for it to rise above 0.5.

1 Like

If it didn’t rise, would it ever stop looking? Is there a way to “kill” it after a certain time?

Oh, I see it has Timeout. Very cool.

1 Like