Samsung TV in HA - Wrong ON/ OFF status detected

Hi everyone,

I have integrated my Samsung UE55RU7172 into Home Assistant using the SamsungTV component.
At this point I can properly turn ON/ OFF the TV, change channels and volume,change the input source.

What I would like to do now is to use the TV status in order to control a bluetooth speaker; so, the speaker must switch ON when the TV is on, and switch OFF when I shutdown the TV.
I created the following automation for switching ON:

- alias: BT speaker auto-on
  trigger:
    platform: state
    entity_id: media_player.livingtv
    from: 'off'
    to: 'on'
  action:
    service: switch.turn_on
    entity_id: switch.BTspeaker

and a similar one for turning OFF.

It works; but I have some issues because, randomly, a wrong TV status is detected in HA: the status is set to OFF, but actually the TV is up and running!
I report down here a screenshot of the HA logbook:

Screen

In this case:

  • I turned ON the TV at 1:13:29 PM;
  • At 1:25:08 PM, status switched to OFF (while TV is ON);
  • After 10 seconds, the status is set back to ON;
  • At 1:34:02, the scenario is repeated again (Status OFF, then ON again).

This strange behaviour is obviously causing the BT speaker to turn OFF and ON continuosly:
Maybe I could solve the problem by “filtering” the OFF/ ON transition in the automation script, but that’s not a clean solution.

Has anyone around here faced a similar issue? Do you know if this can be related to the TV sending somehow a wrong status message, or it is related to the SamsungTV component handling?

Thanks in advance!

1 Like

Hi! Have you found a solution for this? I have the exactly same problem.

I gave up trying to get one of the Samsung Integrations to work for my particular TV, instead I use a ping binary sensor to determine when it is on:

- platform: ping
  name: Samsung Smart TV
  host: 192.168.1.21
  count: 2
  scan_interval: 30

There’s a slight delay but at least it gives a reliable indication … maybe something for you to try if you cannot find a solution.

1 Like

Good idea! Much simpler than the workaround I did after I asked about what you have done. Here i decided to get a spare smart plug that was lying around, and monitor power consumption:

But I reckon it’s hacky and your solution is way cleaner. Thanks for the tip!

I have the same issue still. Just to help others, I implemented a workaround. Using the Samsung TV Smart intengration (from HACS) and the utilise the “Muted” attribute as status if TV is on or off. If muted equals false then TV is on. If musted does not equal false TV is off. That works great, only problem is if you would actually mute your TV.