How to test a sensor when reach a value for a period of time

Hi all

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.

How can this be done in Node Red?

Thanks

Have you noted this?
https://developers.home-assistant.io/docs/en/0.72/hassio_debugging.html

:question:

how this relate to my question?

Probably a trigger node is what you’re looking for. Have it send nothing for x period of time and then forward on.

thanks @phantomdarkness

I thought it was trigger node, but I’ve never used and I really don’t know how to use it.
Do you know where I can see some examples?

Just run a search in this forum? I found a few examples just looking for “trigger node”. Like this: Looking for examples of the trigger node

Otherwise I’d suggest just playing with it/reading the documentation in NR. It’s pretty decent actually.