mirror of
https://github.com/revspace/operame
synced 2025-12-13 16:06:30 +00:00
bugfix: publish temperature and humidity to their own topics
This commit is contained in:
parent
ca29d59c08
commit
4dbff9156d
1 changed files with 2 additions and 2 deletions
|
|
@ -623,7 +623,7 @@ void loop() {
|
||||||
doc["value"] = t;
|
doc["value"] = t;
|
||||||
doc["unit"] = "C";
|
doc["unit"] = "C";
|
||||||
serializeJson(doc, message);
|
serializeJson(doc, message);
|
||||||
retain(mqtt_topic, message);
|
retain(mqtt_topic_temperature, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
//humidity
|
//humidity
|
||||||
|
|
@ -638,7 +638,7 @@ void loop() {
|
||||||
doc["value"] = h;
|
doc["value"] = h;
|
||||||
doc["unit"] = "%R.H.";
|
doc["unit"] = "%R.H.";
|
||||||
serializeJson(doc, message);
|
serializeJson(doc, message);
|
||||||
retain(mqtt_topic, message);
|
retain(mqtt_topic_humidity, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue