Skip to content

Commit

Permalink
fix(home-assistant): use consistent id for instance availability
Browse files Browse the repository at this point in the history
We need to match the behavior of the ClusterService to make it work
correctly across the cluster. Apart from that the instance name could
technically also contain characters that aren't valid for MQTT topic
names, so turning it into an ID like we do everywhere else isn't a bad
idea in general. For more info check the later posts in #728.
  • Loading branch information
mKeRix committed May 30, 2021
1 parent d9a2136 commit 6781619
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/integrations/home-assistant/home-assistant.service.ts
Expand Up @@ -69,7 +69,7 @@ export class HomeAssistantService
this.config = this.configService.get('homeAssistant');

const instanceName = this.configService.get('global').instanceName;
this.statusTopic = `${INSTANCE_STATUS_BASE_TOPIC}/${instanceName}`;
this.statusTopic = `${INSTANCE_STATUS_BASE_TOPIC}/${makeId(instanceName)}`;
}

/**
Expand Down

0 comments on commit 6781619

Please sign in to comment.