mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Enable long-term statistics for Fast.com sensor (#97139)
This commit is contained in:
parent
57c640c83c
commit
2220396c41
@ -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…
x
Reference in New Issue
Block a user