From b6a7ade6f2314b72fa72364aa605b369c3de10c0 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 16 Jan 2022 14:56:58 +0100 Subject: [PATCH] Publish bridge/state online when Home Assistant comes online. https://github.com/Koenkk/zigbee2mqtt/issues/9629 --- lib/extension/homeassistant.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 44bf09fb0..624c119bd 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -1271,6 +1271,7 @@ export default class HomeAssistant extends Extension { data.message.toLowerCase() === 'online') { const timer = setTimeout(async () => { // Publish all device states. + this.mqtt.publish('bridge/state', 'online', {retain: true, qos: 0}); for (const device of this.zigbee.devices(false)) { if (this.state.exists(device)) { this.publishEntityState(device, this.state.get(device));