don't retain volatile values

This commit is contained in:
2016-04-23 01:44:56 +02:00
parent 9b9e8db96a
commit 99ce953de3
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ void DeviceDht::deviceLoop() {
if (!isEqual(humidity, previousHumidity)) {
Serial.print("humidity: ");
Serial.println(humidity);
if (!Homie.setNodeProperty(humidityNode, "value", String(humidity), true)) {
if (!Homie.setNodeProperty(humidityNode, "value", String(humidity), false)) {
Serial.println("Sending failed");
}
} else {
@ -45,7 +45,7 @@ void DeviceDht::deviceLoop() {
if (!isEqual(temperature, previousTemperature)) {
Serial.print("temperature: ");
Serial.println(temperature);
if (!Homie.setNodeProperty(temperatureNode, "value", String(temperature), true)) {
if (!Homie.setNodeProperty(temperatureNode, "value", String(temperature), false)) {
Serial.println("Sending failed");
}
} else {
@ -55,7 +55,7 @@ void DeviceDht::deviceLoop() {
if (!isEqual(heatindex, previousHeatindex)) {
Serial.print("heatindex: ");
Serial.println(heatindex);
if (!Homie.setNodeProperty(heatindexNode, "value", String(heatindex), true)) {
if (!Homie.setNodeProperty(heatindexNode, "value", String(heatindex), false)) {
Serial.println("Sending failed");
}
} else {