Fix IRHVAC crash v2

This commit is contained in:
s-hadinger 2023-08-26 15:04:08 +02:00 committed by GitHub
parent d4c1315248
commit ab94b16d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 :)