Enable long-term statistics for Fast.com sensor (#97139)
This commit is contained in:
parent
57c640c83c
commit
2220396c41
1 changed files with 6 additions and 1 deletions
|
@ -3,7 +3,11 @@ from __future__ import annotations
|
|||
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import UnitOfDataRate
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -31,6 +35,7 @@ class SpeedtestSensor(RestoreEntity, SensorEntity):
|
|||
_attr_name = "Fast.com Download"
|
||||
_attr_device_class = SensorDeviceClass.DATA_RATE
|
||||
_attr_native_unit_of_measurement = UnitOfDataRate.MEGABITS_PER_SECOND
|
||||
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||
_attr_icon = "mdi:speedometer"
|
||||
_attr_should_poll = False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue