Add last_reset for Sense trend sensors (#63490)
This commit is contained in:
parent
9c11b0aa89
commit
fe17f97543
5 changed files with 10 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
"domain": "emulated_kasa",
|
||||
"name": "Emulated Kasa",
|
||||
"documentation": "https://www.home-assistant.io/integrations/emulated_kasa",
|
||||
"requirements": ["sense_energy==0.9.3"],
|
||||
"requirements": ["sense_energy==0.9.6"],
|
||||
"codeowners": ["@kbickar"],
|
||||
"quality_scale": "internal",
|
||||
"iot_class": "local_push"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "sense",
|
||||
"name": "Sense",
|
||||
"documentation": "https://www.home-assistant.io/integrations/sense",
|
||||
"requirements": ["sense_energy==0.9.3"],
|
||||
"requirements": ["sense_energy==0.9.6"],
|
||||
"codeowners": ["@kbickar"],
|
||||
"config_flow": true,
|
||||
"dhcp": [
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Support for monitoring a Sense energy sensor."""
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
|
@ -297,6 +298,11 @@ class SenseTrendsSensor(CoordinatorEntity, SensorEntity):
|
|||
"""Return the state of the sensor."""
|
||||
return round(self._data.get_trend(self._sensor_type, self._variant_id), 1)
|
||||
|
||||
@property
|
||||
def last_reset(self):
|
||||
"""Return the time when the sensor was last reset, if any."""
|
||||
return self._data.trend_start(self._sensor_type)
|
||||
|
||||
|
||||
class SenseEnergyDevice(SensorEntity):
|
||||
"""Implementation of a Sense energy device."""
|
||||
|
|
|
@ -2166,7 +2166,7 @@ sense-hat==2.2.0
|
|||
|
||||
# homeassistant.components.emulated_kasa
|
||||
# homeassistant.components.sense
|
||||
sense_energy==0.9.3
|
||||
sense_energy==0.9.6
|
||||
|
||||
# homeassistant.components.sentry
|
||||
sentry-sdk==1.5.2
|
||||
|
|
|
@ -1322,7 +1322,7 @@ screenlogicpy==0.5.4
|
|||
|
||||
# homeassistant.components.emulated_kasa
|
||||
# homeassistant.components.sense
|
||||
sense_energy==0.9.3
|
||||
sense_energy==0.9.6
|
||||
|
||||
# homeassistant.components.sentry
|
||||
sentry-sdk==1.5.2
|
||||
|
|
Loading…
Add table
Reference in a new issue