mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Add long-term statistics for SimpliSafe sensors (#55419)
This commit is contained in:
parent
331726ec2f
commit
1aa30ea87b
@ -1,7 +1,7 @@
|
|||||||
"""Support for SimpliSafe freeze sensor."""
|
"""Support for SimpliSafe freeze sensor."""
|
||||||
from simplipy.entity import EntityTypes
|
from simplipy.entity import EntityTypes
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntity
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_FAHRENHEIT
|
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_FAHRENHEIT
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -35,6 +35,7 @@ class SimplisafeFreezeSensor(SimpliSafeBaseSensor, SensorEntity):
|
|||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_TEMPERATURE
|
_attr_device_class = DEVICE_CLASS_TEMPERATURE
|
||||||
_attr_native_unit_of_measurement = TEMP_FAHRENHEIT
|
_attr_native_unit_of_measurement = TEMP_FAHRENHEIT
|
||||||
|
_attr_state_class = STATE_CLASS_MEASUREMENT
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_update_from_rest_api(self) -> None:
|
def async_update_from_rest_api(self) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user