TV not updating state when turning off - scan/refresh interval a possible solution?

Hi,

I’m new to home automation, Home Assistant and Hass.io, which is probably why I’ve hit my current problem.

I’ve set up my Samsung tv (2016-model) in the configuration.yaml and it works most of the time. The state of the tv rightly goes from “off” to “on” in my Home Assistant, when I turn on the tv. However, the state does not automatically go from “on” to “off” when turning of the tv. State only changes when I press “turn off” via the Home Assistant - also when the tv is already off.
Fairly certain that this issue hasn’t been there the whole time, but I’ve only had Hass.io running for about a week.

I’ve tried using refresh_interval on the tv, but this only results in error.

Is there a way for the assistant to regularly ask for the state of the tv and update if turned off?

Thank you

the rookie

What is your configuration.yaml and what is the exact model of the TV?

If it’s anything like my Samsung TV, it doesn’t support wake-on-lan, which means I can’t actually turn it on and it doesn’t respond to anything while it’s off. Mine also does not send any sort of status update when you turn it off.

It’s a model KS7005. The tv in configuration.yaml looks like this:

media_player:

  • platform: samsungtv
    host: xxx.xxx.xxx.xxx
    port: 8001
    name: Living Room TV

Not very interested in wake-on-lan, so haven’t tried setting it up. However, I do feel a bit like having the tv shown in Home Assistant is kinda pointless if the shown state might not be the actual state…

I just saw a thread with this custom samsungtv component: https://github.com/jaruba/ha-samsungtv-custom. You might have better luck trying that out?

[edit] here’s the thread: Improving Samsung TV Control

That custom component seems to return an error as well, but I will try to ask my question in the thread as well - thank you!