Skip to content

Commit

Permalink
Fix availability bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoods committed Jun 11, 2021
1 parent 26aae86 commit 42f7875
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const configureMQTT = async (commands, client, mqttHA) => {
const mqttHA = new MQTT(vehicles[0], 'homeassistant');
const availTopic = mqttHA.getAvailabilityTopic();
const client = await connectMQTT(availTopic);
client.publish(availTopic, 'true', {retain: true})
.then(() => logger.debug('Published availability'));
await configureMQTT(commands, client, mqttHA);

const configurations = new Map();
Expand Down

0 comments on commit 42f7875

Please sign in to comment.