Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 646ef47f6f | |||
| c344c43185 |
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -622,6 +622,8 @@ class UnderlyingClimate(UnderlyingEntity):
|
|||||||
ATTR_ENTITY_ID: self._entity_id,
|
ATTR_ENTITY_ID: self._entity_id,
|
||||||
"target_temp_high": target_temp,
|
"target_temp_high": target_temp,
|
||||||
"target_temp_low": target_temp,
|
"target_temp_low": target_temp,
|
||||||
|
# issue 518 - we should send also the target temperature, even in TARGET RANGE
|
||||||
|
"temperature": target_temp,
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
@@ -1001,6 +1001,7 @@ async def test_bug_508(
|
|||||||
# "temperature": 17.5,
|
# "temperature": 17.5,
|
||||||
"target_temp_high": 10,
|
"target_temp_high": 10,
|
||||||
"target_temp_low": 10,
|
"target_temp_low": 10,
|
||||||
|
"temperature": 10,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@@ -1021,6 +1022,7 @@ async def test_bug_508(
|
|||||||
"entity_id": "climate.mock_climate",
|
"entity_id": "climate.mock_climate",
|
||||||
"target_temp_high": 31,
|
"target_temp_high": 31,
|
||||||
"target_temp_low": 31,
|
"target_temp_low": 31,
|
||||||
|
"temperature": 31,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user