Skip to content

Commit

Permalink
fix(home-assistant): do not log binary state updates
Browse files Browse the repository at this point in the history
When a camera entity was enabled this would quickly get really annoying
in the logs.
  • Loading branch information
mKeRix committed Dec 16, 2020
1 parent df72629 commit a96b566
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/integrations/home-assistant/home-assistant.service.ts
Expand Up @@ -178,7 +178,9 @@ export class HomeAssistantService
return;
}

this.logger.debug(`Sending new state ${state} for ${config.uniqueId}`);
const logState = state instanceof Buffer ? '<binary>' : state;
this.logger.debug(`Sending new state ${logState} for ${config.uniqueId}`);

this.mqttClient.publish(
config.stateTopic,
state instanceof Buffer ? state : String(state),
Expand Down

0 comments on commit a96b566

Please sign in to comment.