From 0e52ea482f40c7b4f1e48992a984cb700b226913 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Wed, 8 Jan 2025 15:27:26 +0100 Subject: [PATCH] Fix hvac_modes never empty in Sensibo (#135029) --- homeassistant/components/sensibo/climate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensibo/climate.py b/homeassistant/components/sensibo/climate.py index ff9aed6f4e772..9a2f265041f5e 100644 --- a/homeassistant/components/sensibo/climate.py +++ b/homeassistant/components/sensibo/climate.py @@ -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 @@ -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