From e8886f3c22b888375b7b12d6688a6fa6f8e084ed Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Sun, 13 Oct 2024 15:14:06 +0200 Subject: [PATCH] fix rate_device_class --- code/components/jomjol_mqtt/server_mqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/components/jomjol_mqtt/server_mqtt.cpp b/code/components/jomjol_mqtt/server_mqtt.cpp index 728689832..33c823f66 100644 --- a/code/components/jomjol_mqtt/server_mqtt.cpp +++ b/code/components/jomjol_mqtt/server_mqtt.cpp @@ -193,7 +193,7 @@ bool MQTThomeassistantDiscovery(int qos) { /* Energy meters need a different Device Class, see https://github.com/jomjol/AI-on-the-edge-device/issues/3333 */ std::string rate_device_class = "volume_flow_rate"; if (meterType == "energy") { - value_state_class = "power"; + rate_device_class = "power"; } // Group | Field | User Friendly Name | Icon | Unit | Device Class | State Class | Entity Category