mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 08:07:45 +00:00
Fix MQTT availability startup race (#37718)
This commit is contained in:
parent
114fbb1278
commit
502f0cd2ce
@ -1083,7 +1083,7 @@ class MqttAvailability(Entity):
|
||||
@callback
|
||||
def async_mqtt_connect(self):
|
||||
"""Update state on connection/disconnection to MQTT broker."""
|
||||
if self.hass.is_running:
|
||||
if not self.hass.is_stopping:
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def async_will_remove_from_hass(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user