Skip to content

Commit

Permalink
Merge pull request #79 from david-kalbermatten/hotfix/broken_reverse_…
Browse files Browse the repository at this point in the history
…cycle

Fix for issue #77 - thank you @david-kalbermatten 
- added missing reverse cycle checks to function that controls heating
  • Loading branch information
zacs authored Feb 4, 2025
2 parents 1a8a33a + e38920c commit 36fb212
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions custom_components/dualmode_generic/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,18 +851,18 @@ def determine_active_entity():

# Check new mode against previous HVAC mode and
if previous_mode is not None and previous_mode != self._hvac_mode:
if previous_mode == HVAC_MODE_COOL:
if previous_mode == HVAC_MODE_COOL and REVERSE_CYCLE_IS_COOLER not in self.reverse_cycle:
await self._async_cooler_turn_off()
elif previous_mode == HVAC_MODE_HEAT:
elif previous_mode == HVAC_MODE_HEAT and REVERSE_CYCLE_IS_HEATER not in self.reverse_cycle:
await self._async_heater_turn_off()
elif previous_mode == HVAC_MODE_FAN_ONLY:
elif previous_mode == HVAC_MODE_FAN_ONLY and REVERSE_CYCLE_IS_FAN not in self.reverse_cycle:
await self._async_fan_turn_off()
elif previous_mode == HVAC_MODE_DRY:
elif previous_mode == HVAC_MODE_DRY and REVERSE_CYCLE_IS_DRYER not in self.reverse_cycle:
await self._async_dryer_turn_off()
elif previous_mode == HVAC_MODE_HEAT_COOL:
if self._hvac_mode == HVAC_MODE_COOL:
if self._hvac_mode == HVAC_MODE_COOL and REVERSE_CYCLE_IS_HEATER not in self.reverse_cycle:
await self._async_heater_turn_off()
elif self._hvac_mode == HVAC_MODE_HEAT:
elif self._hvac_mode == HVAC_MODE_HEAT and REVERSE_CYCLE_IS_COOLER not in self.reverse_cycle:
await self._async_cooler_turn_off()

# Thermostat is running and in HEAT_COOL mode
Expand Down

0 comments on commit 36fb212

Please sign in to comment.