From b64c392c586b4ba07cf1e9d3455296177ff363ab Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 9 Jan 2026 17:21:26 +0100 Subject: [PATCH] rename uom::HZ to HERTZ, avoids compile error on ESP32C3 --- interface/src/app/main/types.ts | 2 +- src/core/emsdevicevalue.h | 2 +- src/core/mqtt.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/app/main/types.ts b/interface/src/app/main/types.ts index 67b88d10e..492ccc532 100644 --- a/interface/src/app/main/types.ts +++ b/interface/src/app/main/types.ts @@ -196,7 +196,7 @@ export enum DeviceValueUOM { MBAR, LH, CTKWH, - HZ + HERTZ } export const DeviceValueUOM_s = [ diff --git a/src/core/emsdevicevalue.h b/src/core/emsdevicevalue.h index 04d28809c..01eb461c2 100644 --- a/src/core/emsdevicevalue.h +++ b/src/core/emsdevicevalue.h @@ -76,7 +76,7 @@ class DeviceValue { MBAR, // 24 - mbar - atmospheric pressure LH, // 25 - l/h - volume flow rate CTKWH, // 26 - ct/kWh - monetary - HZ, // 27 - Hz - frequency + HERTZ, // 27 - Hz - frequency CONNECTIVITY // 28 - used in HA - connectivity }; diff --git a/src/core/mqtt.cpp b/src/core/mqtt.cpp index 03d9b2eb5..2e43c2f6b 100644 --- a/src/core/mqtt.cpp +++ b/src/core/mqtt.cpp @@ -1268,7 +1268,7 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8 doc[sc_ha] = sc_ha_total_increasing; doc[dc_ha] = "monetary"; break; - case DeviceValueUOM::HZ: + case DeviceValueUOM::HERTZ: doc[sc_ha] = sc_ha_measurement; doc[dc_ha] = "frequency"; break;