mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Add state_class to current bandwith sensors for bbox integration (#58086)
* Add state_class to current bandwith sensors * Fix isort test
This commit is contained in:
parent
c75346addc
commit
2bd64cec11
@ -10,6 +10,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
STATE_CLASS_MEASUREMENT,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
)
|
)
|
||||||
@ -48,12 +49,14 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
|||||||
key="current_down_bandwidth",
|
key="current_down_bandwidth",
|
||||||
name="Currently Used Download Bandwidth",
|
name="Currently Used Download Bandwidth",
|
||||||
native_unit_of_measurement=DATA_RATE_MEGABITS_PER_SECOND,
|
native_unit_of_measurement=DATA_RATE_MEGABITS_PER_SECOND,
|
||||||
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="current_up_bandwidth",
|
key="current_up_bandwidth",
|
||||||
name="Currently Used Upload Bandwidth",
|
name="Currently Used Upload Bandwidth",
|
||||||
native_unit_of_measurement=DATA_RATE_MEGABITS_PER_SECOND,
|
native_unit_of_measurement=DATA_RATE_MEGABITS_PER_SECOND,
|
||||||
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
icon="mdi:upload",
|
icon="mdi:upload",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user