diff --git a/custom_components/dual_smart_thermostat/hvac_device/cooler_fan_device.py b/custom_components/dual_smart_thermostat/hvac_device/cooler_fan_device.py index 035ea43..d5d6424 100644 --- a/custom_components/dual_smart_thermostat/hvac_device/cooler_fan_device.py +++ b/custom_components/dual_smart_thermostat/hvac_device/cooler_fan_device.py @@ -160,7 +160,8 @@ async def async_control_hvac(self, time=None, force=False): await self.async_turn_off() self.HVACActionReason = HVACActionReason.NONE case _: - _LOGGER.warning("Invalid HVAC mode: %s", self._hvac_mode) + if self._hvac_mode is not None: + _LOGGER.warning("Invalid HVAC mode: %s", self._hvac_mode) async def async_turn_on(self): """self._control_hvac will handle the logic for turning on the heater and aux heater.""" diff --git a/custom_components/dual_smart_thermostat/hvac_device/heater_cooler_device.py b/custom_components/dual_smart_thermostat/hvac_device/heater_cooler_device.py index bcfa48f..2b57d85 100644 --- a/custom_components/dual_smart_thermostat/hvac_device/heater_cooler_device.py +++ b/custom_components/dual_smart_thermostat/hvac_device/heater_cooler_device.py @@ -122,7 +122,8 @@ async def async_control_hvac(self, time=None, force=False): case HVACMode.OFF: await self.async_turn_off() case _: - _LOGGER.warning("Invalid HVAC mode: %s", self._hvac_mode) + if self._hvac_mode is not None: + _LOGGER.warning("Invalid HVAC mode: %s", self._hvac_mode) def is_cold_or_hot(self) -> tuple[bool, bool, ToleranceDevice]: """Check if the floor is too cold or too hot."""