Skip to content

Commit

Permalink
Fix hvac_modes never empty in Sensibo (#135029)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST authored Jan 8, 2025
1 parent d46be61 commit 0e52ea4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/sensibo/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from bisect import bisect_left
from typing import Any
from typing import TYPE_CHECKING, Any

import voluptuous as vol

Expand Down Expand Up @@ -255,8 +255,8 @@ def hvac_mode(self) -> HVACMode:
@property
def hvac_modes(self) -> list[HVACMode]:
"""Return the list of available hvac operation modes."""
if not self.device_data.hvac_modes:
return [HVACMode.OFF]
if TYPE_CHECKING:
assert self.device_data.hvac_modes
return [SENSIBO_TO_HA[mode] for mode in self.device_data.hvac_modes]

@property
Expand Down

0 comments on commit 0e52ea4

Please sign in to comment.