TV standby automation

Hi, I wonder if anyone could help please. I am ok at basic automations but don’t understand yaml or some of the other tems in HA. I have an automation where my tuya presence sensor puts my tv into standby using my broadlink mini 3 if no detection for 10 mins. This is great but if the sensor picks up any occupancy even for a split second the automation is triggered again and when I come back to the tv it is now on! Is there a way to control the automation better so it doesn’t keep happeng. My apologies if i’m missing something obvious.

Show your automation?

This is normal because every time the presence sensor detects that there is no more movement, it sends a new signal.
Presumably a new power on/off signal. So in your example, it would probably also come on when the TV is in standby and then you leave the room.

You need a way to detect whether the TV is on. In other words, a condition. This can either be an integration, e.g. to the TV, if available. Or a socket that measures the consumption and recognizes whether the TV is on. Or perhaps also WLAN/LAN, which recognizes whether the TV is connected, i.e. switched on.

1 Like

You could also use a toggle helper (input_boolean).

3 Likes