Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4873bfd27 |
@@ -737,37 +737,37 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
|||||||
)
|
)
|
||||||
need_write_state = True
|
need_write_state = True
|
||||||
|
|
||||||
# try to acquire window entity state
|
# try to acquire window entity state
|
||||||
if self._window_sensor_entity_id:
|
if self._window_sensor_entity_id:
|
||||||
window_state = self.hass.states.get(self._window_sensor_entity_id)
|
window_state = self.hass.states.get(self._window_sensor_entity_id)
|
||||||
if window_state and window_state.state not in (
|
if window_state and window_state.state not in (
|
||||||
STATE_UNAVAILABLE,
|
STATE_UNAVAILABLE,
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
):
|
):
|
||||||
self._window_state = window_state.state == STATE_ON
|
self._window_state = window_state.state == STATE_ON
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"%s - Window state have been retrieved: %s",
|
"%s - Window state have been retrieved: %s",
|
||||||
self,
|
self,
|
||||||
self._window_state,
|
self._window_state,
|
||||||
)
|
)
|
||||||
need_write_state = True
|
need_write_state = True
|
||||||
|
|
||||||
# try to acquire motion entity state
|
# try to acquire motion entity state
|
||||||
if self._motion_sensor_entity_id:
|
if self._motion_sensor_entity_id:
|
||||||
motion_state = self.hass.states.get(self._motion_sensor_entity_id)
|
motion_state = self.hass.states.get(self._motion_sensor_entity_id)
|
||||||
if motion_state and motion_state.state not in (
|
if motion_state and motion_state.state not in (
|
||||||
STATE_UNAVAILABLE,
|
STATE_UNAVAILABLE,
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
):
|
):
|
||||||
self._motion_state = motion_state.state
|
self._motion_state = motion_state.state
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"%s - Motion state have been retrieved: %s",
|
"%s - Motion state have been retrieved: %s",
|
||||||
self,
|
self,
|
||||||
self._motion_state,
|
self._motion_state,
|
||||||
)
|
)
|
||||||
# recalculate the right target_temp in activity mode
|
# recalculate the right target_temp in activity mode
|
||||||
await self._async_update_motion_temp()
|
await self._async_update_motion_temp()
|
||||||
need_write_state = True
|
need_write_state = True
|
||||||
|
|
||||||
if self._presence_on:
|
if self._presence_on:
|
||||||
# try to acquire presence entity state
|
# try to acquire presence entity state
|
||||||
@@ -1916,8 +1916,8 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
|||||||
self,
|
self,
|
||||||
new_preset,
|
new_preset,
|
||||||
)
|
)
|
||||||
# We do not change the preset which is kept to ACTIVITY but only the target_temperature
|
# We do not change the preset which is kept to ACTIVITY but only the target_temperature
|
||||||
# We take the presence into account
|
# We take the presence into account
|
||||||
|
|
||||||
await self._async_internal_set_temperature(
|
await self._async_internal_set_temperature(
|
||||||
self.find_preset_temp(new_preset)
|
self.find_preset_temp(new_preset)
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
"quality_scale": "silver",
|
"quality_scale": "silver",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"ssdp": [],
|
"ssdp": [],
|
||||||
"version": "6.2.6",
|
"version": "6.2.7",
|
||||||
"zeroconf": []
|
"zeroconf": []
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user