mirror of
https://github.com/anklimov/lighthub
synced 2025-12-07 12:19:49 +03:00
building flags & small bugfix (MQTT&TOGGLE)
This commit is contained in:
@@ -959,7 +959,7 @@ if (!strchr(addrstr,'/')) setTopic(addrstr,sizeof(addrstr),T_OUT,emit->valuestri
|
||||
else if (strlen(scmd->valuestring))
|
||||
mqttClient.publish(addrstr, scmd->valuestring, true);
|
||||
} else { //send reset command
|
||||
if (!rcmd || rcmd->type == aJson_String) mqttClient.publish(addrstr, "OFF", true);
|
||||
if (!rcmd || rcmd->type != aJson_String) mqttClient.publish(addrstr, "OFF", true);
|
||||
else if (strlen(rcmd->valuestring))mqttClient.publish(addrstr, rcmd->valuestring, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user