@@ -1170,11 +1170,11 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
return self._power_temp
|
return self._power_temp
|
||||||
else:
|
else:
|
||||||
# Select _ac presets if in COOL Mode (or over_switch with _ac_mode)
|
# Select _ac presets if in COOL Mode (or over_switch with _ac_mode)
|
||||||
if self._ac_mode and (
|
if self._ac_mode and self._hvac_mode == HVACMode.COOL:
|
||||||
self._hvac_mode == HVACMode.COOL or not self.is_over_climate
|
|
||||||
):
|
|
||||||
preset_mode = preset_mode + PRESET_AC_SUFFIX
|
preset_mode = preset_mode + PRESET_AC_SUFFIX
|
||||||
|
|
||||||
|
_LOGGER.info("%s - find preset temp: %s", self, preset_mode)
|
||||||
|
|
||||||
if self._presence_on is False or self._presence_state in [
|
if self._presence_on is False or self._presence_state in [
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
STATE_HOME,
|
STATE_HOME,
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ async def test_over_switch_ac_full_start(hass: HomeAssistant, skip_hass_states_i
|
|||||||
|
|
||||||
assert entity.hvac_mode is HVACMode.OFF
|
assert entity.hvac_mode is HVACMode.OFF
|
||||||
assert entity.hvac_action is HVACAction.OFF
|
assert entity.hvac_action is HVACAction.OFF
|
||||||
assert entity.target_temperature == 27 # eco_ac_away
|
assert entity.target_temperature == 16 # eco_ac_away
|
||||||
|
|
||||||
# Close a window
|
# Close a window
|
||||||
with patch(
|
with patch(
|
||||||
@@ -142,11 +142,18 @@ async def test_over_switch_ac_full_start(hass: HomeAssistant, skip_hass_states_i
|
|||||||
await entity.async_set_hvac_mode(HVACMode.HEAT)
|
await entity.async_set_hvac_mode(HVACMode.HEAT)
|
||||||
assert entity.hvac_mode is HVACMode.HEAT
|
assert entity.hvac_mode is HVACMode.HEAT
|
||||||
|
|
||||||
|
# switch to comfort
|
||||||
await entity.async_set_preset_mode(PRESET_COMFORT)
|
await entity.async_set_preset_mode(PRESET_COMFORT)
|
||||||
assert entity.preset_mode is PRESET_COMFORT
|
assert entity.preset_mode is PRESET_COMFORT
|
||||||
assert entity.target_temperature == 26
|
assert entity.target_temperature == 17
|
||||||
|
|
||||||
# switch to Eco
|
# switch to Eco
|
||||||
await entity.async_set_preset_mode(PRESET_ECO)
|
await entity.async_set_preset_mode(PRESET_ECO)
|
||||||
assert entity.preset_mode is PRESET_ECO
|
assert entity.preset_mode is PRESET_ECO
|
||||||
assert entity.target_temperature == 27
|
assert entity.target_temperature == 16
|
||||||
|
|
||||||
|
# switch to boost
|
||||||
|
await entity.async_set_preset_mode(PRESET_BOOST)
|
||||||
|
assert entity.preset_mode is PRESET_BOOST
|
||||||
|
assert entity.target_temperature == 18
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user