Smart Light on/off based on power usage of device

I have wrote a very simple Piston that will turn my TVs light strip on and off based on the TVs Smart Plug power usage.

The issue I’m running into is that at times, the light strip will turn on and off even with the TV on. This happens when the screen is nearly or completely black (as it’s using much less power).

When the TV is off, it uses between 22-24 watts of power.

  1. How can I configure this Piston so that it only turns off the light strip when power usage is 24 watts or less for 5 seconds +

  2. It seems the Piston is only triggered when there is a change to the power usage. Is there a way to periodically check the power usage? Like when it’s off, it will always be 22 or 24 watts. It will trigger once when it hits 22/24 watts but after that, no trigger until there is a change in power usage. This question is a little off topic but am curious if anyone has ideas on this for my other ideas.

You’re looking for power stays greater than XXX for YYY (units) See line 32 in my piston below:


Wow perfect. I didn’t scroll down far enough. I was selecting “was less than or equal to”.

1 Like