Skip to content

Commit

Permalink
fix: add missing opening state check when keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
Miklos Szanyi committed Aug 13, 2021
1 parent 834b26a commit 545b5f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/dual_smart_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,12 @@ async def _async_control_heat_cool(self, time=None, force=False):
async def async_heater_cooler_toggle(self, too_cold, too_hot):
"""Toggle heater cooler based on device state"""
if too_cold:
await self._async_heater_turn_on()
if not self._is_opening_open:
await self._async_heater_turn_on()
await self._async_cooler_turn_off()
elif too_hot:
await self._async_cooler_turn_on()
if not self._is_opening_open:
await self._async_cooler_turn_on()
await self._async_heater_turn_off()
else:
await self._async_heater_turn_off()
Expand Down

0 comments on commit 545b5f6

Please sign in to comment.