New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mqtt.generic] Clear availability subscriptions on stop #8317
Conversation
Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
2086e2b
to
9131aec
Compare
@jochen314 I would like to hear your thoughts. |
I guess, I missed that. The method was empty before... Could we add the call to |
Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Sure, I didn't add it because the Homie binding doesn't make use of the availability topic feature, but it is way better to keep all three handlers synchronized. Done! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
Closes openhab#8316 Signed-off-by: Aitor Iturrioz <riturrioz@gmail.com>
When Home Assistant and MQTT generic things were disposed (and stopped), parent class (AbstractMQTTThingHandler)
stop()
method was not called and, thus, availability subscriptions were not removed. This made the Thing stay offline in some cases, as described in #8316.The AbstractMQTTThingHandler's
stop()
method has also been simplified callingclearAllAvailabilityTopics();
. @jochen314, what do you think about this last change? I don't see any problem emptying the availabilityStates map of AbstractMQTTThingHandler, because theinitialize()
method of both GenericThingHandler and HomeAssistantThingHandler takes care of creating the map again.Fixes #8316
Review request: @jochen314, @J-N-K, @fwolter, @cpmeister, @Hilbrand.
Signed-off-by: Aitor Iturrioz riturrioz@gmail.com