Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
Jean-Marc Collin
2024-10-12 12:50:12 +02:00
committed by GitHub
parent c344c43185
commit 646ef47f6f
3 changed files with 10 additions and 3 deletions

View File

@@ -625,7 +625,8 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
async def end_climate_changed(changes: bool): async def end_climate_changed(changes: bool):
"""To end the event management""" """To end the event management"""
if changes: if changes:
self.async_write_ha_state() # already done by update_custom_attribute
# self.async_write_ha_state()
self.update_custom_attributes() self.update_custom_attributes()
await self.async_control_heating() await self.async_control_heating()

View File

@@ -186,7 +186,8 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
self._hvac_mode or HVACMode.OFF, self._hvac_mode or HVACMode.OFF,
) )
self.update_custom_attributes() self.update_custom_attributes()
self.async_write_ha_state() # already done bu update_custom_attributes
# self.async_write_ha_state()
@overrides @overrides
def incremente_energy(self): def incremente_energy(self):
@@ -203,6 +204,8 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
else: else:
self._total_energy += added_energy self._total_energy += added_energy
self.update_custom_attributes()
_LOGGER.debug( _LOGGER.debug(
"%s - added energy is %.3f . Total energy is now: %.3f", "%s - added energy is %.3f . Total energy is now: %.3f",
self, self,

View File

@@ -270,7 +270,8 @@ class ThermostatOverValve(BaseThermostat[UnderlyingValve]): # pylint: disable=a
self._last_calculation_timestamp = now self._last_calculation_timestamp = now
self.update_custom_attributes() self.update_custom_attributes()
self.async_write_ha_state() # already done in update_custom_attributes
# self.async_write_ha_state()
@overrides @overrides
def incremente_energy(self): def incremente_energy(self):
@@ -287,6 +288,8 @@ class ThermostatOverValve(BaseThermostat[UnderlyingValve]): # pylint: disable=a
else: else:
self._total_energy += added_energy self._total_energy += added_energy
self.update_custom_attributes()
_LOGGER.debug( _LOGGER.debug(
"%s - added energy is %.3f . Total energy is now: %.3f", "%s - added energy is %.3f . Total energy is now: %.3f",
self, self,