Standardize MQTTDiscovery Temp Keys [deprecate tem key] (#703)
* Detect when sensor isn't available or read fails * Add temperature conversion macros * Add 'tempc' & 'tempf' keys to published values * Unique Values for HA Discovery * Remove degree symbol from temp sensors Co-authored-by: Jonathan Michael Wells <jonathan-wells@oist.jp>
This commit is contained in:
1 parent
b7a4591518
commit
4f1b49d135
10 files changed
+97
-52
No files matched your search
@@ -168,6 +168,9 @@ WiFiClient eClient;
|
||||
EthernetClient eClient;
|
||||
#endif
|
||||
|
||||
#define convertTemp_CtoF(c) ((c * 1.8) + 32)
|
||||
#define convertTemp_FtoC(f) ((f - 32) * 5 / 9)
|
||||
|
||||
// client link to pubsub mqtt
|
||||
PubSubClient client(eClient);
|
||||
|
||||
|
||||
Reference in new issue
Block a user