From a96b56635a66e71b8ad5707597936a81bbef3395 Mon Sep 17 00:00:00 2001 From: Heiko Rothe Date: Wed, 16 Dec 2020 13:04:19 +0100 Subject: [PATCH] fix(home-assistant): do not log binary state updates When a camera entity was enabled this would quickly get really annoying in the logs. --- src/integrations/home-assistant/home-assistant.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integrations/home-assistant/home-assistant.service.ts b/src/integrations/home-assistant/home-assistant.service.ts index 8bc634a..4d71f0c 100644 --- a/src/integrations/home-assistant/home-assistant.service.ts +++ b/src/integrations/home-assistant/home-assistant.service.ts @@ -178,7 +178,9 @@ export class HomeAssistantService return; } - this.logger.debug(`Sending new state ${state} for ${config.uniqueId}`); + const logState = state instanceof Buffer ? '' : state; + this.logger.debug(`Sending new state ${logState} for ${config.uniqueId}`); + this.mqttClient.publish( config.stateTopic, state instanceof Buffer ? state : String(state),