diff --git a/src/device-types/HASwitch.cpp b/src/device-types/HASwitch.cpp index 7f369c8..32278a6 100644 --- a/src/device-types/HASwitch.cpp +++ b/src/device-types/HASwitch.cpp @@ -166,7 +166,7 @@ void HASwitch::publishCurrentState() return; } - mqtt()->publish(topic, (_currentState ? StateOn : StateOff)); + mqtt()->publish(topic, (_currentState ? StateOn : StateOff), true); } void HASwitch::subscribeCommandTopic()