mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Add long term statistics for IPP ink/toner levels (#102632)
This commit is contained in:
parent
8376a6bda9
commit
c685d56e82
@ -12,6 +12,7 @@ from homeassistant.components.sensor import (
|
|||||||
SensorDeviceClass,
|
SensorDeviceClass,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
|
SensorStateClass,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_LOCATION, PERCENTAGE, EntityCategory
|
from homeassistant.const import ATTR_LOCATION, PERCENTAGE, EntityCategory
|
||||||
@ -119,6 +120,7 @@ async def async_setup_entry(
|
|||||||
name=marker.name,
|
name=marker.name,
|
||||||
icon="mdi:water",
|
icon="mdi:water",
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
attributes_fn=_get_marker_attributes_fn(
|
attributes_fn=_get_marker_attributes_fn(
|
||||||
index,
|
index,
|
||||||
lambda marker: {
|
lambda marker: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user