mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Remove literal string
This commit is contained in:
parent
8d2e0af2f4
commit
e984d49946
@ -297,10 +297,12 @@ static void mqtt_message_cb(char * topic, byte * payload, unsigned int length)
|
||||
if(!strcmp_P(topic, PSTR("status"))) { // endsWith status
|
||||
if(!strcasecmp_P((char *)payload, PSTR("OFF"))) {
|
||||
{
|
||||
char msg[4];
|
||||
char tmp_topic[strlen(mqttNodeTopic) + 8];
|
||||
snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR("%sstatus"), mqttNodeTopic);
|
||||
bool res = mqttPublish(tmp_topic, "ON"); //, true); // Literal String
|
||||
mqttResult(res, tmp_topic, "ON");
|
||||
snprintf_P(msg, sizeof(msg), PSTR("ON"));
|
||||
|
||||
bool res = mqttClient.publish(tmp_topic, msg, true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user