Skip to content

Commit

Permalink
Fix boost mode (#24980)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ authored and pvizeli committed Jul 6, 2019
1 parent 6bdee22 commit 99ecc65
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions homeassistant/components/homematicip_cloud/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ def preset_mode(self):
"""
if self._device.boostMode:
return PRESET_BOOST
if self._device.controlMode == HMIP_AUTOMATIC_CM:
return PRESET_COMFORT
if self._device.controlMode == HMIP_ECO_CM:
return PRESET_ECO
if (self._home.get_functionalHome(IndoorClimateHome).absenceType
in [AbsenceType.PERIOD, AbsenceType.PERMANENT,
AbsenceType.VACATION]):
return PRESET_AWAY
if self._device.controlMode == HMIP_AUTOMATIC_CM:
return PRESET_COMFORT
if self._device.controlMode == HMIP_ECO_CM:
return PRESET_ECO

return None

Expand Down Expand Up @@ -157,6 +157,8 @@ async def async_set_hvac_mode(self, hvac_mode: str) -> Awaitable[None]:

async def async_set_preset_mode(self, preset_mode: str) -> Awaitable[None]:
"""Set new preset mode."""
if self._device.boostMode and preset_mode != PRESET_BOOST:
await self._device.set_boost(False)
if preset_mode == PRESET_BOOST:
await self._device.set_boost()
elif preset_mode == PRESET_COMFORT:
Expand Down

0 comments on commit 99ecc65

Please sign in to comment.