From c685d56e8225e1d5939befbea3ae4eecba03b540 Mon Sep 17 00:00:00 2001 From: tronikos Date: Sat, 25 Nov 2023 01:46:49 -0800 Subject: [PATCH] Add long term statistics for IPP ink/toner levels (#102632) --- homeassistant/components/ipp/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/ipp/sensor.py b/homeassistant/components/ipp/sensor.py index 3bc7035e26b..a2cb5cd34dc 100644 --- a/homeassistant/components/ipp/sensor.py +++ b/homeassistant/components/ipp/sensor.py @@ -12,6 +12,7 @@ from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorEntityDescription, + SensorStateClass, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ATTR_LOCATION, PERCENTAGE, EntityCategory @@ -119,6 +120,7 @@ async def async_setup_entry( name=marker.name, icon="mdi:water", native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, attributes_fn=_get_marker_attributes_fn( index, lambda marker: {