Skip to content

Commit c49b1ef

Browse files
committed
Zigbee2mqtt: fix 200ms false timeouts !!!
1 parent 2ed4cd4 commit c49b1ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: sources/led-drivers/net/DriverNetZigbee2mqtt.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,18 @@ bool DriverNetZigbee2mqtt::powerOnOff(bool isOn)
7575

7676
if (isOn)
7777
{
78+
emit GlobalSignals::getInstance()->SignalMqttSubscribe(true, topic);
79+
7880
row["state"] = "OFF";
7981
doc.setObject(row);
8082

8183
lastWill.push_back(topic);
8284
lastWill.push_back(doc.toJson(QJsonDocument::Compact));
8385
}
86+
else
87+
{
88+
emit GlobalSignals::getInstance()->SignalMqttSubscribe(false, topic);
89+
}
8490
}
8591

8692
if (_zigInstance.lamps.size() > 0)

0 commit comments

Comments
 (0)