mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add Michaels solution to uom on Domoticz
This commit is contained in:
@@ -1140,10 +1140,10 @@ void Mqtt::add_ha_uom(JsonObject doc, const uint8_t type, const uint8_t uom, con
|
|||||||
} else if (uom == DeviceValueUOM::SECONDS) {
|
} else if (uom == DeviceValueUOM::SECONDS) {
|
||||||
doc[uom_ha] = "s";
|
doc[uom_ha] = "s";
|
||||||
} else if (uom != DeviceValueUOM::NONE) {
|
} else if (uom != DeviceValueUOM::NONE) {
|
||||||
// Domoticz use "" for a no-uom
|
doc[uom_ha] = EMSdevice::uom_to_string(uom); // default
|
||||||
if (discovery_type() == discoveryType::HOMEASSISTANT) {
|
} else if (discovery_type() != discoveryType::HOMEASSISTANT) {
|
||||||
doc[uom_ha] = EMSdevice::uom_to_string(uom); // default
|
// Domoticz use " " for a no-uom
|
||||||
}
|
doc[uom_ha] = " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user