Add long-term statistics for Guardian sensors (#55413)

* Add long-term statistics for Guardian sensors

* Code review
pull/56830/head
Aaron Bach 2021-09-29 12:06:48 -06:00 committed by GitHub
parent f7ef973c68
commit ae00c221e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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,