Skip to content

Commit

Permalink
Formatted with black
Browse files Browse the repository at this point in the history
  • Loading branch information
ollo69 authored and swingerman committed Nov 9, 2022
1 parent d08674f commit 01b145c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions custom_components/dual_smart_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,9 @@ async def _async_control_heat_cool(self, time=None, force=False):
async with self._temp_lock:
_LOGGER.debug("_async_control_heat_cool")
if (
not self._active and
self._is_configured_for_heat_cool() and
self._cur_temp is not None
not self._active
and self._is_configured_for_heat_cool()
and self._cur_temp is not None
):
self._active = True
if not self._needs_control(time, force, True):
Expand Down Expand Up @@ -1013,14 +1013,12 @@ def _is_configured_for_heat_cool(self) -> bool:
def _set_support_flags(self) -> None:
"""set the correct support flags based on configuration"""
self._support_flags = (
SUPPORT_PRESET_MODE
if self._support_flags >= SUPPORT_PRESET_MODE
else 0
SUPPORT_PRESET_MODE if self._support_flags >= SUPPORT_PRESET_MODE else 0
)

if (
not self._is_configured_for_heat_cool() or
self._hvac_mode in (HVACMode.COOL, HVACMode.HEAT)
if not self._is_configured_for_heat_cool() or self._hvac_mode in (
HVACMode.COOL,
HVACMode.HEAT,
):
self._support_flags |= SUPPORT_TARGET_TEMPERATURE
else:
Expand Down

0 comments on commit 01b145c

Please sign in to comment.