roberodin / ha-samsungtv-custom

📺 HomeAssistant - SamsungTV Custom Component
Apache License 2.0
124 stars 179 forks source link

state change bounce when turned off #39

Open energywave opened 4 years ago

energywave commented 4 years ago

Hello and thank you for your wonderful work. I've managed to add my TV (UE50NU7092) using these parameters (can turn on and off TV, change source):

  - platform: samsungtv_custom
    host: xxx.xxx.xxx.xxx
    mac: yy-yy-yy-yy-yy-yy
    name: TV soggiorno
    port: 8002    
    sourcelist: '{"TV": "KEY_TV", "HDMI": "KEY_HDMI"}'
    protocol: ws

The problem is that I'm using state change trigger to set a specific scene in my living room, so that when you turn on TV some lights turn off and a small lamp turn on and vice versa when you turn off TV (only when the sun is down). That works great when turning on TV (with a delay of some seconds but that's acceptable). The problem is when I turn off TV. Sometimes Home Assistant takes several seconds (tens of seconds...) to detect power off, sometimes it takes a few seconds. But that's not the main issue... After some seconds, Home Assistant will detect a fake power on (that trigger the TV scene) and after something like 30 seconds or more the TV will be again detected correctly as OFF. In this way that trigger is unusable :( If there is a way to generate a log or something to better understand what's happening I'll be happy to share it and try to help you solve this issue if there is a way. Thank you in advance.