sehaas / ha_hisense_tv

Hisense TV integration for Home Assistant
MIT License
101 stars 22 forks source link

TV status after Home Assistant reboot #18

Closed andriuskr closed 2 years ago

andriuskr commented 2 years ago

After rebooting Home Asisstant TV is shown as ON. Does not respond to OFF/ON button. Turning ON tv manually solves the problem.

sehaas commented 2 years ago

Please see #14 and check for retained values on your MQTT broker.

andriuskr commented 2 years ago

Deleted this topic from broker, rebooted. Has retained flag. After HA reboot it still show TV as on...

image
sehaas commented 2 years ago

Maybe the broker of the TV has also the retained flag set? It would be possible to ignore messages having the retained flag set, but I don't know if this breaks anything else.

andriuskr commented 2 years ago

Yes, correct. TV broker also has retained flag.

sakowicz commented 2 years ago

I can confirm that it happens also to me for last few weeks. Retained flag is on.

sehaas commented 2 years ago

Only for the state topic or others as well?

Have you tried to delete the flag on both brokers?

sehaas commented 2 years ago

I can reproduce the behaviour. My code already handles (ignores) retained messages, but the check isn't working any more. It looks like the boolean flag was changed to a number (0 & 1). Let's see if this is a bug in HA or if missed some breaking API changes.

sehaas commented 2 years ago

Fixed. Retained messages will be ignored.