Skip to content

Commit

Permalink
Merge pull request #105 from MTrab:Heating-signals-inverted
Browse files Browse the repository at this point in the history
Fix Icon device matching
  • Loading branch information
MTrab committed Feb 16, 2024
2 parents 25a1aa5 + 9c8cef2 commit de397cf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions custom_components/danfoss_ally/climate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Danfoss Ally thermostats."""

import functools as ft
import logging
from datetime import datetime
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -564,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":
if "Icon" in model:
_LOGGER.debug("Adding Icon device")

entity = IconClimate(
ally,
name,
Expand All @@ -577,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,
Expand Down

0 comments on commit de397cf

Please sign in to comment.