Add long term statistics for IPP ink/toner levels (#102632)

pull/104498/head
tronikos 2023-11-25 01:46:49 -08:00 committed by GitHub
parent 8376a6bda9
commit c685d56e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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: {