send CMD value for number as NAN

This commit is contained in:
MichaelDvP
2024-07-08 19:04:16 +02:00
parent 3d7378a1a8
commit c3ce0c1e2d

View File

@@ -1767,7 +1767,11 @@ bool EMSdevice::generate_values(JsonObject output, const int8_t tag_filter, cons
// we don't want Commands in Console ('show values') // we don't want Commands in Console ('show values')
else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::CONSOLE) { else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::CONSOLE) {
if (dv.uom == DeviceValueUOM::NONE) {
json[name] = ""; json[name] = "";
} else {
json[name] = NAN;
}
} }
// check for value outside min/max range and adapt the limits to avoid HA complains // check for value outside min/max range and adapt the limits to avoid HA complains