Closed marthoc closed 6 years ago
I am sure that this issue is related to this HASS issue: https://github.com/home-assistant/home-assistant/issues/8589.
In the meantime I am trying to figure out a workaround.
A few more points:
A possible workaround is to use Home Assistant's mqtt birth_message functionality: see https://home-assistant.io/docs/mqtt/birth_will/.
This would require subscribing to the birth_message topic, and adding an elseif statement to the message callback that would listen for the birth_message topic and payload and publish status updates for both doors when HASS publishes an "online" payload to the birth_message topic.
It would also therefore require users to add the birth_message lines to configuration.yaml.
I will be pushing an update to the dev branch that does just this, along with the required configuration.yaml lines, and testing shortly.
Workaround added to Release 1.0.1 to address this issue. Leaving issue open to properly address this in the future if the bug is fixed upstream.
Turns out that the workaround added to release 1.0.1 didn't adequately address the problem on startup - most of the time, the Cover state was still showing "unknown" even though GarHAge was receiving the birth_message and publishing a status update in response.
I've added new documentation and released v1.0.1a with a new workaround that seems to work much better (in fact, after many many restarts in testing, I've yet to have an incorrect state in HASS since implementing it).
See the documentation re HASS Automation as Workaround.
This should be taken care of by the client.publish() call in reconnect(), but when using HA's embedded broker, a restart of HA loses the door status. To do: