From a6b9e734827c992fc5d9388c0585f48707188fd4 Mon Sep 17 00:00:00 2001 From: Aivaras Date: Wed, 3 Feb 2021 23:46:49 +0200 Subject: [PATCH] #3 empty preset used instead of comfort --- README.md | 8 ++++++++ custom_components/uponor/climate.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b48e25b..3738a40 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ Thermostat names can be changed in Uponor Smatrix app or via configuration. `switch.uponor_cooling_mode` activates cooling mode when switched on and heating mode when it's switched off. This switch will be added only if cooling is available in your system. +### Climate entity + +Climate entity has read-only preset. Two presets are available: +* ECO - activated when scheduled ECO profile is on OR if Temporary ECO mode activated on the mobile app. +* Away - activated when `switch.uponor_away` is on. + +If none of those are true, then preset is empty. + ## Configuration - `names` : map (optional) - custom name for every thermostat. `C1_T1` is the thermostat id. Check state attributes of diff --git a/custom_components/uponor/climate.py b/custom_components/uponor/climate.py index f5b4a98..ab566df 100644 --- a/custom_components/uponor/climate.py +++ b/custom_components/uponor/climate.py @@ -113,11 +113,11 @@ def preset_mode(self): return PRESET_ECO if self._state_proxy.is_away(): return PRESET_AWAY - return PRESET_COMFORT + return None @property def preset_modes(self): - return [self.preset_mode] + return [self.preset_mode] if self.preset_mode is not None else [] @property def temperature_unit(self):