Actually listen to all topics too. Not just subscribe.

This commit is contained in:
Thomas Lovén 2021-01-29 20:41:55 +01:00
parent 2a3bcb0753
commit 9bb8f69c23

View file

@ -100,7 +100,7 @@ class MqttClient extends EventEmitter {
? JSON.parse(message.toString())
: message.toString();
if (topic === startTopic) {
if (startTopics.includes(topic)) {
logger.info('Home Assistant has started. lets do discovery.');
self.emit('connected');
} else if (topic.includes('set')) {