I want to create a trigger which triggers an automation when a sensor value changes from any value above 200 to any value below 10. So I want HA to behave like: when the sensor value is anything below 10, HA says “hey I don’t care”. When sensor value goes above 200, HA says “hey I am watching you”. When sensor value drops to any number below 10, HA triggers the automation actions only once and then keeps ignoring the sensor till it goes back above 200 again. How to achieve this?
Sometime later… having a similar problem.
It sounds very simple for the logic, but quite complicated workaround.
I have an idea how this could be implemented in a generic way.
It would be nice to have a section similar to trigger, but as an “arming” for the actual trigger. Or think about it like a 2 stage trigger.
Whether it should be called “arming”, or “pre-trigger”, I don’t know (or care )
The logic would be: the pre-trigger (stage 1) is just enabling the normal trigger (stage 2).
This way one can implement time hysteresis (e.g. a device must be off a certain duration before allowing turning on again), or numerical hysteresis like you wanted here…
I’m relatively new and I might have missed it .
This is very useful in all kind of hysteresis situations (time and/or numerical), and I saw many related questions (people using workarounds…).
I beliebe it deserves a special hint somewhere in the documentation.