From e909242bc5a9f24c494e0814c4c3c33b3a49718b Mon Sep 17 00:00:00 2001 From: Benjamin <46243805+bbr111@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:45:01 +0200 Subject: [PATCH] Fix missing if statement in homematic (#114832) * homematic fix issue #114807 Update climate.py * Update homeassistant/components/homematic/climate.py --------- Co-authored-by: Joost Lekkerkerker --- homeassistant/components/homematic/climate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homematic/climate.py b/homeassistant/components/homematic/climate.py index efdb9324f76ad..16c345c563548 100644 --- a/homeassistant/components/homematic/climate.py +++ b/homeassistant/components/homematic/climate.py @@ -113,7 +113,11 @@ def preset_mode(self): @property def preset_modes(self): """Return a list of available preset modes.""" - return [HM_PRESET_MAP[mode] for mode in self._hmdevice.ACTIONNODE] + return [ + HM_PRESET_MAP[mode] + for mode in self._hmdevice.ACTIONNODE + if mode in HM_PRESET_MAP + ] @property def current_humidity(self):