Skip to content

Commit

Permalink
fix(mqtt): Publish state for both hass and homie, as the hass device …
Browse files Browse the repository at this point in the history
…availability_topic is set to the same topic (#860)
  • Loading branch information
makuser committed Apr 26, 2021
1 parent aa85205 commit 219bc34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mqtt/MqttController.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class MqttController {
* @return {Promise<void>}
*/
async setState(state) {
if (this.homieEnabled) {
if (this.homieEnabled || this.hassEnabled) {
await this.asyncClient.publish(this.stateTopic, state, {
// @ts-ignore
qos: MqttCommonAttributes.QOS.AT_LEAST_ONCE,
Expand Down

0 comments on commit 219bc34

Please sign in to comment.