Remove last_reset from vicare sensor (#63879)

pull/63882/head
Erik Montnemery 2022-01-11 10:25:00 +01:00 committed by GitHub
parent ccc4423c62
commit f4e9187d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 8 deletions

View File

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