From 3fd863bd7c51e422580296ae968d287d7bfd4f04 Mon Sep 17 00:00:00 2001 From: wittypluck Date: Sat, 27 Apr 2024 22:21:08 +0200 Subject: [PATCH] Unifi: enable statistics for PoE port power sensor (#116308) Add SensorStateClass.MEASUREMENT to PoE port power sensor --- homeassistant/components/unifi/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/unifi/sensor.py b/homeassistant/components/unifi/sensor.py index 17b3cae93fd..2685f075cd5 100644 --- a/homeassistant/components/unifi/sensor.py +++ b/homeassistant/components/unifi/sensor.py @@ -228,6 +228,7 @@ ENTITY_DESCRIPTIONS: tuple[UnifiSensorEntityDescription, ...] = ( key="PoE port power sensor", device_class=SensorDeviceClass.POWER, entity_category=EntityCategory.DIAGNOSTIC, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.WATT, entity_registry_enabled_default=False, api_handler_fn=lambda api: api.ports,