From dd8d5bc46c3ab890244b646f442e6f0658775774 Mon Sep 17 00:00:00 2001 From: Malene Trab Date: Fri, 9 Feb 2024 12:15:40 +0000 Subject: [PATCH 1/2] Add model match --- custom_components/danfoss_ally/climate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/custom_components/danfoss_ally/climate.py b/custom_components/danfoss_ally/climate.py index ecbb1e7..29efa9a 100644 --- a/custom_components/danfoss_ally/climate.py +++ b/custom_components/danfoss_ally/climate.py @@ -1,4 +1,5 @@ """Support for Danfoss Ally thermostats.""" + import functools as ft import logging from datetime import datetime @@ -283,9 +284,9 @@ def set_temperature(self, **kwargs): changed = False if temperature is not None and setpoint_code is not None: - self._device[ - setpoint_code - ] = temperature # Update temperature in current copy + self._device[setpoint_code] = ( + temperature # Update temperature in current copy + ) self._ally.set_temperature(self._device_id, temperature, setpoint_code) changed = True @@ -564,7 +565,7 @@ def create_climate_entity(ally, name: str, device_id: str, model: str) -> AllyCl heat_max_temp = 35.0 heat_step = 0.5 - if model == "Icon RT": + if model == "Icon RT" or model == "": entity = IconClimate( ally, name, From c8905f71ccf02c7e8dcc055cdf4c85ef3dd57f51 Mon Sep 17 00:00:00 2001 From: Malene Trab Date: Fri, 16 Feb 2024 10:33:45 +0000 Subject: [PATCH 2/2] Updating Icon model matching --- custom_components/danfoss_ally/climate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/danfoss_ally/climate.py b/custom_components/danfoss_ally/climate.py index 29efa9a..bd00915 100644 --- a/custom_components/danfoss_ally/climate.py +++ b/custom_components/danfoss_ally/climate.py @@ -565,7 +565,9 @@ def create_climate_entity(ally, name: str, device_id: str, model: str) -> AllyCl heat_max_temp = 35.0 heat_step = 0.5 - if model == "Icon RT" or model == "": + if "Icon" in model: + _LOGGER.debug("Adding Icon device") + entity = IconClimate( ally, name, @@ -578,6 +580,8 @@ def create_climate_entity(ally, name: str, device_id: str, model: str) -> AllyCl support_flags, ) else: + _LOGGER.debug("Adding Ally device") + entity = AllyClimate( ally, name,