Remove last_reset from vicare sensor (#63879)
parent
ccc4423c62
commit
f4e9187d01
|
@ -30,7 +30,6 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from . import ViCareRequiredKeysMixin
|
||||
from .const import (
|
||||
|
@ -425,7 +424,6 @@ class ViCareSensor(SensorEntity):
|
|||
self._api = api
|
||||
self._device_config = device_config
|
||||
self._state = None
|
||||
self._last_reset = dt_util.utcnow()
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
|
@ -457,14 +455,8 @@ class ViCareSensor(SensorEntity):
|
|||
"""Return the state of the sensor."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def last_reset(self):
|
||||
"""Return the time when the sensor was last reset."""
|
||||
return self._last_reset
|
||||
|
||||
def update(self):
|
||||
"""Update state of sensor."""
|
||||
self._last_reset = dt_util.start_of_local_day()
|
||||
try:
|
||||
with suppress(PyViCareNotSupportedFeatureError):
|
||||
self._state = self.entity_description.value_getter(self._api)
|
||||
|
|
Loading…
Reference in New Issue