File tree Expand file tree Collapse file tree
custom_components/smart_thermostat Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 HVAC_MODE_HEAT ,
4343 HVAC_MODE_OFF ,
4444 PRESET_AWAY ,
45+ PRESET_NONE ,
4546 SUPPORT_PRESET_MODE ,
4647 SUPPORT_TARGET_TEMPERATURE ,
4748)
@@ -328,7 +329,7 @@ def preset_mode(self):
328329 def preset_modes (self ):
329330 """Return a list of available preset modes."""
330331 if self ._away_temp :
331- return [PRESET_AWAY ]
332+ return [PRESET_NONE , PRESET_AWAY ]
332333 return None
333334
334335 @property
@@ -517,7 +518,7 @@ async def async_set_preset_mode(self, preset_mode: str):
517518 self ._saved_target_temp = self ._target_temp
518519 self ._target_temp = self ._away_temp
519520 await self ._async_control_heating (calc_pid = True )
520- elif not preset_mode and self ._is_away :
521+ elif preset_mode != PRESET_AWAY and self ._is_away :
521522 self ._is_away = False
522523 self ._target_temp = self ._saved_target_temp
523524 await self ._async_control_heating (calc_pid = True )
You can’t perform that action at this time.
0 commit comments