Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added missing reverse cycle checks to function that controls heating #79

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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