mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 11:14:58 +00:00
add precision to voltage in HA
This commit is contained in:
@@ -1320,6 +1320,7 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8
|
|||||||
case DeviceValueUOM::VOLTS:
|
case DeviceValueUOM::VOLTS:
|
||||||
doc[sc_ha] = sc_ha_measurement;
|
doc[sc_ha] = sc_ha_measurement;
|
||||||
doc[dc_ha] = "voltage";
|
doc[dc_ha] = "voltage";
|
||||||
|
doc["sug_dsp_prc"] = 2; // round to 2 decimal places
|
||||||
break;
|
break;
|
||||||
case DeviceValueUOM::MBAR:
|
case DeviceValueUOM::MBAR:
|
||||||
doc[sc_ha] = sc_ha_measurement;
|
doc[sc_ha] = sc_ha_measurement;
|
||||||
|
|||||||
Reference in New Issue
Block a user