From c094e8fd01aaafabf05a48ce088dcffcc2039fe3 Mon Sep 17 00:00:00 2001 From: Aleksey Zagorodnikov Date: Sun, 25 Jun 2023 21:25:17 +0600 Subject: [PATCH] Fix stat_class for energy sensor (#865) --- src/httpserver/hass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpserver/hass.c b/src/httpserver/hass.c index 78114741d..d059c1f64 100644 --- a/src/httpserver/hass.c +++ b/src/httpserver/hass.c @@ -574,7 +574,7 @@ HassDeviceInfo* hass_init_sensor_device_info(ENTITY_TYPE type, int channel, int return NULL; } - if (type != READONLYLOWMIDHIGH_SENSOR) { + if (type != READONLYLOWMIDHIGH_SENSOR && type != ENERGY_SENSOR) { cJSON_AddStringToObject(info->root, "stat_cla", "measurement"); }