add code to ignore lock action after mqtt reconnect

This commit is contained in:
technyon
2024-07-12 13:03:21 +02:00
parent 94a8bd1c8e
commit ef878592c1
4 changed files with 32 additions and 0 deletions

View File

@@ -182,6 +182,11 @@ void NukiNetworkLock::onMqttDataReceived(const char* topic, byte* payload, const
{
char* value = (char*)payload;
if(_network->mqttRecentlyConnected() && _network->pathEquals(_mqttPath, mqtt_topic_lock_action, topic))
{
Log->println("MQTT recently connected, ignoring lock action.");
}
if(comparePrefixedPath(topic, mqtt_topic_reset) && strcmp(value, "1") == 0)
{
Log->println(F("Restart requested via MQTT."));