mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
domoticz use "" for no-uom (https://github.com/emsesp/EMS-ESP32/issues/2177#issuecomment-2462320401)
This commit is contained in:
@@ -1140,9 +1140,12 @@ void Mqtt::add_ha_uom(JsonObject doc, const uint8_t type, const uint8_t uom, con
|
||||
} else if (uom == DeviceValueUOM::SECONDS) {
|
||||
doc[uom_ha] = "s";
|
||||
} else if (uom != DeviceValueUOM::NONE) {
|
||||
// Domoticz use "" for a no-uom
|
||||
if (discovery_type() == discoveryType::HOMEASSISTANT) {
|
||||
doc[uom_ha] = EMSdevice::uom_to_string(uom); // default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set state and device class
|
||||
// also icon, when there is no device class that sets one
|
||||
|
||||
Reference in New Issue
Block a user