From 4382596d48ec69c0958b858a5cf801bd56da9d8e Mon Sep 17 00:00:00 2001 From: dprslt Date: Sat, 6 Jul 2024 12:15:41 +0200 Subject: [PATCH] Refresh MQTT status on each new message --- src/ports-adapters/domotic/HomeAssistant.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ports-adapters/domotic/HomeAssistant.ts b/src/ports-adapters/domotic/HomeAssistant.ts index 65ef0c7..9a808e5 100644 --- a/src/ports-adapters/domotic/HomeAssistant.ts +++ b/src/ports-adapters/domotic/HomeAssistant.ts @@ -60,6 +60,7 @@ export class HomeAssistant { console.log('[HomeAssistant] - Not connected to the broker, skipping'); return; } + await this.brokerPort.publish(`homeassistant/sensor/${this.sensorName}/status`, 'online'); await this.brokerPort.publish( 'homeassistant/sensor/envoy-90/state', JSON.stringify({