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

fix: Invalid HVAC mode: None #188

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down