forked from home-assistant/core
Add long-term statistics for Guardian sensors (#55413)
* Add long-term statistics for Guardian sensors * Code review
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
"""Sensors for the Elexa Guardian integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
||||
from homeassistant.components.sensor import (
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
DEVICE_CLASS_BATTERY,
|
||||
@@ -41,6 +45,7 @@ SENSOR_DESCRIPTION_TEMPERATURE = SensorEntityDescription(
|
||||
name="Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_FAHRENHEIT,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
)
|
||||
SENSOR_DESCRIPTION_UPTIME = SensorEntityDescription(
|
||||
key=SENSOR_KIND_UPTIME,
|
||||
|
Reference in New Issue
Block a user