Samsung TV integration faster detection?

Hi guys,

I have my 2012 Samsung smart tv set-up inside home assistant and it works like a charm.
The only question I have is, how to make the on / off detection faster?
It takes forever to detect it on / off; not even always. sometimes it takes 5 seconds, other times it takes over 20 seconds.

Thanks.
Dennis

Looking at the device type, it’s Local Polling.

Be default, this is probably set to 30 seconds.

You can try defining the scan_interval in your config, though note it may not actually do anything as it depends on if the actual integration is using that value or not.

scan interval is invalid for the samsungtv integration :frowning:

Yeah, looks like it’s hard coded here. All it does is try to open the remote in a loop with a 31 second timeout. If the remote is open, it reports is_on. If the remote is not open, it reports that it’s off.

I may sound stupid but, where do I find that file?
I am running home assistant - former hassio

I’m not sure where it lives in a normal install.

I found it the way I find all source code. On an integration page on the top right, there is a link to the github.

Searching through that code I found out how it reports is_on and followed the code further to the bridge.py.

It’s probably embedded in the python env somewhere, i.e.:

/usr/local/lib/python3.7/site-packages/homeassistant/components/samsungtv