mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix goodwe midnight error (#95041)
This commit is contained in:
parent
27da7d68de
commit
3b24a943ab
@ -243,7 +243,7 @@ class InverterSensor(CoordinatorEntity[GoodweUpdateCoordinator], SensorEntity):
|
|||||||
In contrast to "total" sensors, these "daily" sensors need to be reset to 0 on midnight.
|
In contrast to "total" sensors, these "daily" sensors need to be reset to 0 on midnight.
|
||||||
"""
|
"""
|
||||||
if not self.coordinator.last_update_success:
|
if not self.coordinator.last_update_success:
|
||||||
self.coordinator.reset_sensor(self._sensor.id)
|
self.coordinator.reset_sensor(self._sensor.id_)
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
_LOGGER.debug("Goodwe reset %s to 0", self.name)
|
_LOGGER.debug("Goodwe reset %s to 0", self.name)
|
||||||
next_midnight = dt_util.start_of_local_day(
|
next_midnight = dt_util.start_of_local_day(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user