From d722d13b0e7efa7cc2fd112961321d15afc43b63 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 2 Aug 2021 16:33:27 +0200 Subject: [PATCH] Add measurement state class to ZHA power devices (#53866) --- homeassistant/components/zha/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index b9a86b79063..3c3aba919ed 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -214,6 +214,7 @@ class ElectricalMeasurement(Sensor): SENSOR_ATTR = "active_power" _device_class = DEVICE_CLASS_POWER + _state_class = STATE_CLASS_MEASUREMENT _unit = POWER_WATT @property