mirror of https://github.com/arendst/Tasmota.git
Fix IRHVAC crash v2
This commit is contained in:
parent
d4c1315248
commit
ab94b16d8d
|
@ -227,7 +227,7 @@ namespace {
|
|||
void addFloatToJson(JsonGeneratorObject& json, const char* key, float value, float noValueConstant = NAN) {
|
||||
if (!isnan(noValueConstant) && value == noValueConstant) {
|
||||
//The "no sensor value" may not be straightforward (e.g.-100.0), hence replacing with explicit n/a
|
||||
json.addStrRaw(key, PSTR(D_JSON_NULL));
|
||||
json.addStrRaw(key, D_JSON_NULL);
|
||||
return;
|
||||
}
|
||||
char s[6]; // Range: -99.9 <> 999.9 should be fine for any sensible temperature value :)
|
||||
|
|
Loading…
Reference in New Issue