From f90f676fafcdb2b9a222f5545f33bcdd006ad36c Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 29 Dec 2025 21:30:33 +0100 Subject: [PATCH] fixes #2862 --- src/core/mqtt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/mqtt.cpp b/src/core/mqtt.cpp index 1d721dd53..4c331f059 100644 --- a/src/core/mqtt.cpp +++ b/src/core/mqtt.cpp @@ -1144,7 +1144,7 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8 const char * sc_ha_total = "total"; const char * sc_ha_total_increasing = "total_increasing"; - // set uom, unless boolean - as HA is fussy with the naming + // set uom, unless boolean - as HA is fussy with the naming and is case sensitive // map too HA uom specific codes from https://github.com/home-assistant/core/blob/dev/homeassistant/const.py if (type != DeviceValueType::BOOL) { if (uom == DeviceValueUOM::HOURS) { @@ -1157,6 +1157,8 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8 doc[uom_ha] = "kB"; } else if (uom == DeviceValueUOM::LMIN) { doc[uom_ha] = "L/min"; + } else if (uom == DeviceValueUOM::LH) { + doc[uom_ha] = "L/h"; } else if (uom != DeviceValueUOM::NONE) { doc[uom_ha] = EMSdevice::uom_to_string(uom); // use default } else if (discovery_type() != discoveryType::HOMEASSISTANT) {