Fix for MQTT topic for temperature F.
This commit is contained in:
parent
de7da8b26e
commit
ce6b5105c6
@ -165,7 +165,7 @@ class UsermodTemperature : public Usermod {
|
|||||||
// reading the sensor
|
// reading the sensor
|
||||||
strcat_P(subuf, PSTR("/temperature"));
|
strcat_P(subuf, PSTR("/temperature"));
|
||||||
mqtt->publish(subuf, 0, true, String(temperature).c_str());
|
mqtt->publish(subuf, 0, true, String(temperature).c_str());
|
||||||
strcat_P(subuf, PSTR("/temperature_f"));
|
strcat_P(subuf, PSTR("_f"));
|
||||||
mqtt->publish(subuf, 0, true, String((float)temperature * 1.8f + 32).c_str());
|
mqtt->publish(subuf, 0, true, String((float)temperature * 1.8f + 32).c_str());
|
||||||
} else {
|
} else {
|
||||||
// publish something else to indicate status?
|
// publish something else to indicate status?
|
||||||
|
Loading…
Reference in New Issue
Block a user