move AC mode config under the right configuration step (#108)

* move AC mode config under the right configuration step
This commit is contained in:
Andrea Nicotra
2023-10-21 08:31:45 +02:00
committed by GitHub
parent 043fd5f7aa
commit eb54f2826f
10 changed files with 206 additions and 99 deletions

View File

@@ -246,7 +246,7 @@ class UnderlyingSwitch(UnderlyingEntity):
return
# If we should heat, starts the cycle with delay
if self._hvac_mode == HVACMode.HEAT and on_time_sec > 0:
if self._hvac_mode in [HVACMode.HEAT, HVACMode.COOL] and on_time_sec > 0:
# Starts the cycle after the initial delay
self._async_cancel_cycle = self.call_later(
self._hass, self._initial_delay_sec, self._turn_on_later