Switching device if Energy Consumption is lower 40watt

Hello my name is Sigurd,
i switch the power of my tv with a shellyplug s controled by a hass.
I can switch it on and off with my smartphone or with an shelly button.

I would like to switch it off after 2 minutes, if the energy consumption is less 40 watt.

This is my yaml code:

It would not work but i dont know how.
Did anybody can help me?

Greetings Sigurd

Take a look at the Numeric state trigger.

1 Like

Thank you,
works now finde.
:grin::+1: