I’m wondering how to test a sensor when i reaches a value and maintain it (also a bigger value) for x secs.
I would like to test the total energy consumption and if reaches the limit for more than x secs, HA will turn off all the Air Cons and other stuff that consumes a lot of energy.