Correct handling of existing MQTT subscriptions (#43056)
This commit is contained in:
parent
d7bcf4a3b4
commit
4e49bd0596
2 changed files with 22 additions and 7 deletions
|
@ -29,6 +29,7 @@ class EntitySubscription:
|
|||
async def resubscribe_if_necessary(self, hass, other):
|
||||
"""Re-subscribe to the new topic if necessary."""
|
||||
if not self._should_resubscribe(other):
|
||||
self.unsubscribe_callback = other.unsubscribe_callback
|
||||
return
|
||||
|
||||
if other is not None and other.unsubscribe_callback is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue