Skip to content

Commit

Permalink
Publish temperature telemetry as float (not string) (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumnerboy12 authored Jun 14, 2022
1 parent 4498865 commit f530c70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=OXRS-SHA-Rack32-ESP32-LIB
version=2.2.0
version=2.3.0
author=SuperHouse Automation Pty Ltd
maintainer=Ben Jones <[email protected]>
sentence=ESP32 Rack32 library for Open eXtensible Rack System firmware
Expand Down
5 changes: 1 addition & 4 deletions src/OXRS_Rack32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,8 @@ void OXRS_Rack32::_updateTempSensor(void)
_screen.showTemp(temperature);

// Publish temp to mqtt
char payload[8];
sprintf(payload, "%2.1f", temperature);

StaticJsonDocument<32> json;
json["temperature"] = payload;
json["temperature"] = temperature;
publishTelemetry(json.as<JsonVariant>());
}

Expand Down

0 comments on commit f530c70

Please sign in to comment.