mirror of
https://github.com/mrcory/arduino-home-assistant.git
synced 2026-08-02 15:24:26 -04:00
publish HASwitch state with "retain" flag
This commit is contained in:
@@ -166,7 +166,7 @@ void HASwitch::publishCurrentState()
|
||||
return;
|
||||
}
|
||||
|
||||
mqtt()->publish(topic, (_currentState ? StateOn : StateOff));
|
||||
mqtt()->publish(topic, (_currentState ? StateOn : StateOff), true);
|
||||
}
|
||||
|
||||
void HASwitch::subscribeCommandTopic()
|
||||
|
||||
Reference in New Issue
Block a user