Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
degrees/percentage both become "value" for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jul 6, 2019
1 parent 7e0f505 commit 8f82035
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shtshow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ void publishStates() {
Homie.getLogger() << "temp: " << temp << ", humidity: " << rh << endl;

tempNode.setProperty("unit").send(useFahrenheit ? "F" : "C");
tempNode.setProperty("degrees").send(String(temp));
tempNode.setProperty("value").send(String(temp));

humidityNode.setProperty("unit").send("RH");
humidityNode.setProperty("percentage").send(String(rh));
humidityNode.setProperty("value").send(String(rh));
} else {
Homie.getLogger() << "SHT3XD error: " << result.error << endl;
}
Expand Down Expand Up @@ -152,9 +152,9 @@ void setup() {
fahrenheitSetting.setDefaultValue(DEFAULT_FAHRENHEIT_FLAG);

humidityNode.advertise("unit");
humidityNode.advertise("percentage");
humidityNode.advertise("value");
tempNode.advertise("unit");
tempNode.advertise("degrees");
tempNode.advertise("value");
Homie.setup();

publishTimerId = homieLoopTimer.setInterval(5000, publishStates);
Expand Down

0 comments on commit 8f82035

Please sign in to comment.