Samsung SmartTV detection - a way to filter out auto-updates?

while rebuilding my scenes and automations I noticed some false-positives that occurs about once on 1-2 days, and started to think if there’s any way to bypass them in homeassistant. let me explain.

I use Samsung UE50F6400, and have it connected to my LAN, obviously. all HDMI ports are occupied by my other devices, and none of them is my Hassio’s RaspberryPi3 device, so HDMI-CEC is not an option. that’s why my configuration recognizes when TV is online by checking & pinging it’s IP, then for example lamp, which stands near “the TV wall” is turning into “TV mode” by turning off 2/3 of it’s bulbs, dimming a little etc., just to make light not interfere with the screen. problem is, that TV checks for it’s firmware updates every now and then, even if in standby mode. as you can imagine - it turns on the “TV mode” in HA :wink: funny thing, when the home is empty and then my notification bot tells me via telegram “hey, I turned on TV mode for you” :smiley: at first I was like “crap, my config is badly written again”, but then I realized what’s up.

so, assuming that I don’t want to turn off auto-updates on my TV [yet], is there any way to check that TV turned on just to check the software and not because some user pressed “power on” on the remote? I’m thinking maybe checking the connection destination [can be a wrong idea, if this check will be performed during normal usage - that would give false-positives in the other side]. I know that there’s a “timeout” option in the samsungtv platform, but it probably won’t help as those update checks are not duration-constant, so I can’t delay my scene’s startup in conection to that [and also I want the scene to fire up ASAP, not after X mins of watching TV, you know ;)]

Maybe you should check whether one of the connected devices is playing, as opposed to checking if the tv is on.

That is what I do: check the state for STB, Chromecast or Kodi player. Then turn on the TV if one of them starts playing and turn it off when they power down.

Then use those tests for the lighting, not whether the tv is on.

@nickrout @Emphyrio thanks for the suggestions! they would be perfect, if only I could use them :wink:
I mean: yep, I use KODI from time to time, and indeed lights change if it’s playing [“the cinema mode”, almost whole room goes dark etc.], same thing for consoles and gaming [also different light modes, because why not ;)]. problem starts with the rest of TV use. I don’t use chromecast [at least yet], because all I need [Netflix, HBO, YouTube etc.] is on my SmartTV, and I don’t want to double the features with another dongle - so detecting chromecast is not an option. regarding the STB - I use CI Interface of my TV with my provider’s card in it [to reduce additional boxes under the TV, and for overall simplification], so there’s nothing to detect :frowning:

that’s the main reason why I was asking - there’s no additional device I could bind with “watching tv” unfortunately. sure, that room’s “TV mode” is not a matter of life-and-death, but if the house is almost totally automated with lighting, why not to add another thing, right? :wink:

I guess it’s impossible then. well, for sure without some software modifications on the TV side I think :confused: [don’t wanna do it, don’t know if something that could help with that even exists, just theoretically].