Samsung TV switches between unknown and off every minute since 0.81

Since 0.81 my HA logbook shows that while my Samsung TV is switched on, it’s state switches between unknown and off every minute swamping the log. I suspect it is related to this change #17357. I can still control the TV through HA, including powering on the TV so I don’t think it is a configuration issue.

I wondered if others are seeing this behaviour and if it is intended or if there is a problem with the recent change?

Also, #17357 sets the state of the TV to “Unknown” when on. Am I alone in thinking that it was better before this change when it would show as “On”?

not exactly the same problem but since I updated to version 0.81.2 or higher the state of my samsung tv changes to unknown instead of on. Last working version: 0.81.1

For now I’ve rolled back to 0.80.3 and everything is back to normal.

+1

Same here, now running latest release 0.82.0

My Samsung TV is also showing unknown state instead of on after no change but a HA upgrade.

Hi guys,

I’ve found a solution for the unknown state issue:

https://github.com/home-assistant/home-assistant/issues/17802#issuecomment-435679342

thx Hackashaq666

@MartinB maybe that solves your problem as well

1 Like

I tried this, and it does restore the state of the TV. The strange thing is that for my TV, after doing this, only power on works!

How did you get the older Samsung TV component working? I tried it by using it in Custom Components but I get this error:

2018-11-18 20:52:02 ERROR (MainThread) [homeassistant.setup] Error during setup of component samsungtv
Traceback (most recent call last):
   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
     component.setup, hass, processed_config)  # type: ignore
 AttributeError: module 'custom_components.samsungtv' has no attribute 'setup'

Hi @dimitripb

I extraced the samsungtv.py from the home-assistant-0.80.3.zip and just copied it into /config/custom_components/media_player/

looks like your samsungtv.py is located at /config/custom_components/ ?

I’m currently using the latest docker image version 0.83.2 and the custom component is still working.

Hope that helps.

Thanks for your answer. My samsungtv.py is also in /config/custom_components/media_player/
I got it working although there is still an error in the log (Component not found). I do not understand why because the custom component is woking correctly.
The problem seems to be fixed in 0.83 so the custom component can be removed again.

I don’t see it is fixed in the 83.0.mu Samsung tv is still off all the time. Before the update it was unknown in 82, but 83 latest it is now just off.
I haven’t played around with the custom component, but you say it works on yours without?

With the latest version the component shows on and off properly again with my tv. It seems that the different Samsung models react different to the HA component. In my case it takes 15 minutes before HA sees my tv is off. Before version 0.81 it took only 30 seconds.

I Guess you are right. Mine doesn’t update any status at all. Just shows as off :frowning:

Some models use encrypted communication. These don’t react at all on HA. There are different ports in use to communicate with, some models keep sending data for 15 minutes after they have been shut down, some models do not react on a ping.
I think it’s hard to make one general HA-component for Samsung TVs. Maybe more variables should be introduced to configure the component.

Does the custom component still work for Samsung TV’s?

Sorry, but the issue is still there.
Samsung Q90 85 on HASSIO 6.1 core 2021.7.2
I want to control the lights when I turn the TV on, so that really messes up the automation.
Samsung Q90 85 Living room turned on
7:52:59 PM - 35 minutes ago
Samsung Q90 85 Living room turned off by Alan Guggenheim
7:52:38 PM - 35 minutes ago
Samsung Q90 85 Living room turned on
7:52:10 PM - 35 minutes ago
Samsung Q90 85 Living room turned off by Alan Guggenheim
7:51:25 PM - 36 minutes ago
Samsung Q90 85 Living room turned on
6:25:24 PM - 2 hours ago
Samsung Q90 85 Living room turned off
6:22:20 PM - 2 hours ago
Samsung Q90 85 Living room turned on
6:22:03 PM - 2 hours ago
Samsung Q90 85 Living room turned off
6:17:20 PM - 2 hours ago
Samsung Q90 85 Living room turned on
6:17:03 PM - 2 hours ago
Samsung Q90 85 Living room turned off
6:12:20 PM - 2 hours ago
Samsung Q90 85 Living room turned on
6:12:03 PM - 2 hours ago
Samsung Q90 85 Living room turned off
6:07:18 PM - 2 hours ago
Samsung Q90 85 Living room turned on
6:07:01 PM - 2 hours ago

same here :-/