From 9b9af7f4e2ee37e2ee952fe48d75f0a2fe883986 Mon Sep 17 00:00:00 2001 From: cyr-ius Date: Sat, 15 Apr 2023 13:32:44 +0200 Subject: [PATCH] Fix supported features --- custom_components/heatzy/climate.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/custom_components/heatzy/climate.py b/custom_components/heatzy/climate.py index d632442..6220268 100644 --- a/custom_components/heatzy/climate.py +++ b/custom_components/heatzy/climate.py @@ -16,10 +16,7 @@ PRESET_AWAY, PRESET_COMFORT, PRESET_ECO, - PRESET_NONE, - SUPPORT_PRESET_MODE, - SUPPORT_TARGET_TEMPERATURE, - SUPPORT_TARGET_TEMPERATURE_RANGE, + # PRESET_NONE, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import TEMP_CELSIUS @@ -157,13 +154,13 @@ class HeatzyPiloteV1Thermostat(HeatzyThermostat): "\u8212\u9002": PRESET_COMFORT, "\u7ecf\u6d4e": PRESET_ECO, "\u89e3\u51bb": PRESET_AWAY, - "\u505c\u6b62": PRESET_NONE, + # "\u505c\u6b62": PRESET_NONE, } HA_TO_HEATZY_STATE = { PRESET_COMFORT: [1, 1, 0], PRESET_ECO: [1, 1, 1], PRESET_AWAY: [1, 1, 2], - PRESET_NONE: [1, 1, 3], + # PRESET_NONE: [1, 1, 3], } HEATZY_STOP = "\u505c\u6b62" @@ -327,9 +324,9 @@ class Glowv1Thermostat(HeatzyPiloteV2Thermostat): # spell-checker:enable _attr_supported_features = ( - SUPPORT_PRESET_MODE - | SUPPORT_TARGET_TEMPERATURE_RANGE - | SUPPORT_TARGET_TEMPERATURE + ClimateEntityFeature.PRESET_MODE + | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE + | ClimateEntityFeature.TARGET_TEMPERATURE ) @property