uom "Kelvin" to HA temperature

This commit is contained in:
MichaelDvP
2022-12-19 13:31:31 +01:00
parent f1dbd3018d
commit cbd55b0366

View File

@@ -1119,6 +1119,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
switch (uom) { switch (uom) {
case DeviceValueUOM::DEGREES: case DeviceValueUOM::DEGREES:
case DeviceValueUOM::DEGREES_R: case DeviceValueUOM::DEGREES_R:
case DeviceValueUOM::K:
doc[ic_ha] = F_(icondegrees); doc[ic_ha] = F_(icondegrees);
break; break;
case DeviceValueUOM::PERCENT: case DeviceValueUOM::PERCENT:
@@ -1184,6 +1185,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
switch (uom) { switch (uom) {
case DeviceValueUOM::DEGREES: case DeviceValueUOM::DEGREES:
case DeviceValueUOM::DEGREES_R: case DeviceValueUOM::DEGREES_R:
case DeviceValueUOM::K:
doc[sc_ha] = F_(measurement); doc[sc_ha] = F_(measurement);
doc[dc_ha] = "temperature"; // no icon needed doc[dc_ha] = "temperature"; // no icon needed
break; break;