diff --git a/homeassistant/components/mqtt/mixins.py b/homeassistant/components/mqtt/mixins.py index a40f06a3bb6..11bf70ceceb 100644 --- a/homeassistant/components/mqtt/mixins.py +++ b/homeassistant/components/mqtt/mixins.py @@ -330,7 +330,10 @@ class MqttAvailability(Entity): self.async_write_ha_state() - self._available = {topic: False for topic in self._avail_topics} + self._available = { + topic: (self._available[topic] if topic in self._available else False) + for topic in self._avail_topics + } topics = { f"availability_{topic}": { "topic": topic,