From 47938a1355e8a5b8de0294b1017c02972d1d9189 Mon Sep 17 00:00:00 2001 From: Florian Heilmann Date: Thu, 25 Feb 2021 09:49:52 +0100 Subject: [PATCH] hm climate: Return PRESET_NONE instead of None (#47003) Signed-off-by: Florian Heilmann --- homeassistant/components/homematic/climate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homematic/climate.py b/homeassistant/components/homematic/climate.py index 3b77b90ff25..aa5fb4a8e44 100644 --- a/homeassistant/components/homematic/climate.py +++ b/homeassistant/components/homematic/climate.py @@ -7,6 +7,7 @@ from homeassistant.components.climate.const import ( PRESET_BOOST, PRESET_COMFORT, PRESET_ECO, + PRESET_NONE, SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE, ) @@ -92,14 +93,14 @@ class HMThermostat(HMDevice, ClimateEntity): return "boost" if not self._hm_control_mode: - return None + return PRESET_NONE mode = HM_ATTRIBUTE_SUPPORT[HM_CONTROL_MODE][1][self._hm_control_mode] mode = mode.lower() # Filter HVAC states if mode not in (HVAC_MODE_AUTO, HVAC_MODE_HEAT): - return None + return PRESET_NONE return mode @property