Skip to content

Commit

Permalink
Zigbee2mqtt: fix 200ms false timeouts !!!
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Dec 30, 2024
1 parent 2ed4cd4 commit c49b1ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/led-drivers/net/DriverNetZigbee2mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,18 @@ bool DriverNetZigbee2mqtt::powerOnOff(bool isOn)

if (isOn)
{
emit GlobalSignals::getInstance()->SignalMqttSubscribe(true, topic);

row["state"] = "OFF";
doc.setObject(row);

lastWill.push_back(topic);
lastWill.push_back(doc.toJson(QJsonDocument::Compact));
}
else
{
emit GlobalSignals::getInstance()->SignalMqttSubscribe(false, topic);
}
}

if (_zigInstance.lamps.size() > 0)
Expand Down

0 comments on commit c49b1ef

Please sign in to comment.