merdok / homebridge-webos-tv

Homebridge plugin for LG webOS TVs
MIT License
656 stars 88 forks source link

Backlight Jumps to 100% if set to 0. #495

Closed JarekToro closed 10 months ago

JarekToro commented 1 year ago

When setting the backlight to any value 1-100% it works as expected. However when the backlight is set to 0. Apple H ome thinks that it is actually 100%. From the logs everything looks normal. No improper value is sent from or to the tv. The payload has backlight to the values you'd expect. From digging into the code I have a guess. The LightbulbService has 2 Characteristics On & Brightness. I think that when Brightness is 0. It feels that the Characteristic of On should take priority. Which would put the light bulb at 100%. If that is the case. Perhaps we change the On Characteristic to also take into account the value of the backlight. Tv.isON && Tv.Backlight !== 0 etc

Showcase

merdok commented 1 year ago

I cannot currently verify that by myself, but usually the LightbulbService sends an Off command when the value goes to 0, i would guess that maybe value 0 is sent and then immediately the Off command follows (or maybe On in that case). Could you verify that? This is only a visual issue in home right? Does it corrects itself after you do other stuff or does it always stay on 100% when the brightness value is 0?

JarekToro commented 1 year ago

It always stays at 100% when the backlight is set to 0. Even if setting to zero comes from the tv itself. I will verify the events but I don't believe that it fires an off or On event.

merdok commented 1 year ago

you can enable deepDebugLog and post the output here so i can have a look what the tv sends https://github.com/merdok/homebridge-webos-tv#troubleshooting