Removed "retain" from MQTT messages.
This commit is contained in:
@@ -162,9 +162,9 @@ class UsermodTemperature : public Usermod {
|
||||
// the DallasTemperature library returns -127C or -196.6F when problem
|
||||
// reading the sensor
|
||||
strcat_P(subuf, PSTR("/temperature"));
|
||||
mqtt->publish(subuf, 0, true, String(temperature).c_str());
|
||||
mqtt->publish(subuf, 0, false, String(temperature).c_str());
|
||||
strcat_P(subuf, PSTR("_f"));
|
||||
mqtt->publish(subuf, 0, true, String((float)temperature * 1.8f + 32).c_str());
|
||||
mqtt->publish(subuf, 0, false, String((float)temperature * 1.8f + 32).c_str());
|
||||
} else {
|
||||
// publish something else to indicate status?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user