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 <joostlek@outlook.com>
This commit is contained in:
Benjamin 2024-04-04 11:45:01 +02:00 committed by GitHub
parent 5be5c37326
commit e909242bc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,7 +113,11 @@ class HMThermostat(HMDevice, ClimateEntity):
@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):