publish HASwitch state with "retain" flag

This commit is contained in:
Dawid Chyrzynski
2020-12-04 21:31:46 +01:00
parent eeb1aa64fb
commit 97aaa25dab
+1 -1
View File
@@ -166,7 +166,7 @@ void HASwitch::publishCurrentState()
return;
}
mqtt()->publish(topic, (_currentState ? StateOn : StateOff));
mqtt()->publish(topic, (_currentState ? StateOn : StateOff), true);
}
void HASwitch::subscribeCommandTopic()