From 0039eb8b25aab08c853f74e9c7ba2a3a10f7a3a2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 08:42:00 +0100 Subject: [PATCH 01/50] Add regulation_control to collect --- plugwise/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/constants.py b/plugwise/constants.py index 82db53377..0fa67e2e1 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -245,6 +245,7 @@ "domestic_hot_water_setpoint", "max_dhw_temperature", "maximum_boiler_temperature", + "regulation_control", "temperature_offset", "thermostat", ] From d1f25234a386ffecaa2f1b8b2c93a685c4bbeaf8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 08:46:34 +0100 Subject: [PATCH 02/50] Change --- plugwise/constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 0fa67e2e1..d64dbe51e 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -245,7 +245,6 @@ "domestic_hot_water_setpoint", "max_dhw_temperature", "maximum_boiler_temperature", - "regulation_control", "temperature_offset", "thermostat", ] @@ -253,6 +252,7 @@ ActuatorDataType = Literal[ "lower_bound", + "regulation_control", "resolution", "setpoint", "setpoint_high", @@ -290,6 +290,7 @@ LIMITS: Final[tuple[str, ...]] = ( "lower_bound", "offset", + "regulation_control", "resolution", "setpoint", "upper_bound", From 8f4b3cf16800c6d8eb015df0166865134b237c36 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 08:50:52 +0100 Subject: [PATCH 03/50] Let float_measure() handle string-type --- plugwise/util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugwise/util.py b/plugwise/util.py index 1b4a3efaf..47d35f90f 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -193,9 +193,13 @@ def escape_illegal_xml_characters(xmldata: str) -> str: return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata) -def format_measure(measure: str, unit: str) -> float | int: +def format_measure(measure: str, unit: str) -> float | int | str: """Format measure to correct type.""" - float_measure = float(measure) + try: + float_measure = float(measure) + except ValueError as exc: + return measure # return string + if unit == PERCENTAGE and 0 < float_measure <= 1: return int(float_measure * 100) From c2b2bd7b9918e9c070119c07bc9405b0e810d5b3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 08:53:23 +0100 Subject: [PATCH 04/50] Move control_state collection --- plugwise/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/constants.py b/plugwise/constants.py index d64dbe51e..8c13c1dcb 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -251,6 +251,7 @@ ACTIVE_ACTUATORS: Final[tuple[str, ...]] = get_args(ActuatorType) ActuatorDataType = Literal[ + "control_state", "lower_bound", "regulation_control", "resolution", @@ -288,6 +289,7 @@ BINARY_SENSORS: Final[tuple[str, ...]] = get_args(BinarySensorType) LIMITS: Final[tuple[str, ...]] = ( + "control_state", "lower_bound", "offset", "regulation_control", From 46bb0c820863bea1fac9c721cd3cc54362ae5c65 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:25:51 +0100 Subject: [PATCH 05/50] Adapt _control_state() --- plugwise/helper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index e4bfb1230..da6eefa4b 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -797,9 +797,10 @@ def _control_state(self, data: GwEntityData, loc_id: str) -> str | bool: Represents the heating/cooling demand-state of the local primary thermostat. Note: heating or cooling can still be active when the setpoint has been reached. """ - locator = f'location[@id="{loc_id}"]/actuator_functionalities/thermostat_functionality[type="thermostat"]/control_state' - if (ctrl_state := self._domain_objects.find(locator)) is not None: - return str(ctrl_state.text) + + if (ctrl_state := data["thermostat"]["control_state"]) is not None: + data["thermostat"].pop("control_state") + return ctrl_state # Handle missing control_state in regulation_mode off for firmware >= 3.2.0 (issue #776) # In newer firmware versions, default to "off" when control_state is not present From 96690dc12c613d52d3565f184986614fe68f8d56 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:32:20 +0100 Subject: [PATCH 06/50] Clean up --- plugwise/data.py | 4 ++-- plugwise/helper.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index 70a4bd3c0..314f7af1d 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -163,12 +163,12 @@ def _get_location_data(self, loc_id: str) -> GwEntityData: data = self._get_zone_data(loc_id) data["control_state"] = "idle" self._count += 1 - if (ctrl_state := self._control_state(data, loc_id)) and str(ctrl_state) in ( + if (ctrl_state := self._control_state(data)) and ctrl_state in ( "cooling", "heating", "preheating", ): - data["control_state"] = str(ctrl_state) + data["control_state"] = ctrl_state if "setpoint" in data["sensors"]: data["sensors"].pop("setpoint") # remove, only used in _control_state() diff --git a/plugwise/helper.py b/plugwise/helper.py index da6eefa4b..31c3abe1e 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -790,7 +790,7 @@ def _rank_thermostat( else: thermo_loc["secondary"].append(appliance_id) - def _control_state(self, data: GwEntityData, loc_id: str) -> str | bool: + def _control_state(self, data: GwEntityData) -> str | bool: """Helper-function for _get_adam_data(). Adam: find the thermostat control_state of a location, from DOMAIN_OBJECTS. From f63daf9ffd9b30a8bab33096e043efb60c1a9418 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:44:59 +0100 Subject: [PATCH 07/50] Add regulation_control items to data --- plugwise/data.py | 2 ++ plugwise/helper.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index 314f7af1d..f37441956 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -161,6 +161,8 @@ def _get_location_data(self, loc_id: str) -> GwEntityData: """ zone = self._zones[loc_id] data = self._get_zone_data(loc_id) + self._regulation_control(data) + data["control_state"] = "idle" self._count += 1 if (ctrl_state := self._control_state(data)) and ctrl_state in ( diff --git a/plugwise/helper.py b/plugwise/helper.py index 31c3abe1e..d81bdab2f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -791,9 +791,9 @@ def _rank_thermostat( thermo_loc["secondary"].append(appliance_id) def _control_state(self, data: GwEntityData) -> str | bool: - """Helper-function for _get_adam_data(). + """Helper-function for _get_location_data(). - Adam: find the thermostat control_state of a location, from DOMAIN_OBJECTS. + Adam: collect the thermostat control_state of a location. Represents the heating/cooling demand-state of the local primary thermostat. Note: heating or cooling can still be active when the setpoint has been reached. """ @@ -834,6 +834,15 @@ def _heating_valves(self) -> int | bool: return False if loc_found == 0 else open_valve_count + def _regulation_control(self, data: GwEntityData) -> None: + """Helper-function for smile.py: _get_location_data(). + + Adam: collect the thermostat regulation_mode of a location. + """ + data["regulation_control_modes"] = ["active", "passive", "off"] + data["select_regulation_control"] = data["thermostat"]["regulation_control"] + data["thermostat"].pop("regulation_control") + def _preset(self, loc_id: str) -> str | None: """Helper-function for smile.py: device_data_climate(). From 8bd0955697d0a52466ba900551d9c4ef761aa514 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:47:32 +0100 Subject: [PATCH 08/50] Correct entity_items assert --- tests/test_adam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index a8ef91155..e5bef690a 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -34,7 +34,7 @@ async def test_connect_adam_plus_anna_new(self): test_items = await self.device_test(api, "2025-10-12 00:00:01", testdata) assert api.gateway_id == "da224107914542988a88561b4452b0f6" - assert self.entity_items == 216 + assert self.entity_items == 220 assert test_items == self.entity_items assert self.entity_list == [ "da224107914542988a88561b4452b0f6", From ec7fd90d754d4b0cd8e468ca5cd507afee5ae2c2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:51:13 +0100 Subject: [PATCH 09/50] Handle None-cases --- plugwise/helper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index d81bdab2f..99750d40a 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -798,7 +798,7 @@ def _control_state(self, data: GwEntityData) -> str | bool: Note: heating or cooling can still be active when the setpoint has been reached. """ - if (ctrl_state := data["thermostat"]["control_state"]) is not None: + if (ctrl_state := data["thermostat"].get("control_state")) is not None: data["thermostat"].pop("control_state") return ctrl_state @@ -839,9 +839,10 @@ def _regulation_control(self, data: GwEntityData) -> None: Adam: collect the thermostat regulation_mode of a location. """ - data["regulation_control_modes"] = ["active", "passive", "off"] - data["select_regulation_control"] = data["thermostat"]["regulation_control"] - data["thermostat"].pop("regulation_control") + if (reg_control := data["thermostat"].get("regulation_control")) is not None: + data["select_regulation_control"] = reg_control + data["regulation_control_modes"] = ["active", "passive", "off"] + data["thermostat"].pop("regulation_control") def _preset(self, loc_id: str) -> str | None: """Helper-function for smile.py: device_data_climate(). From bfcfe74d89520d370c0e1cb2bedd2819e7e5af9f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 09:57:02 +0100 Subject: [PATCH 10/50] Correct item_count --- plugwise/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 99750d40a..77f9d179a 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -800,6 +800,7 @@ def _control_state(self, data: GwEntityData) -> str | bool: if (ctrl_state := data["thermostat"].get("control_state")) is not None: data["thermostat"].pop("control_state") + self._count -= 1 return ctrl_state # Handle missing control_state in regulation_mode off for firmware >= 3.2.0 (issue #776) @@ -843,6 +844,7 @@ def _regulation_control(self, data: GwEntityData) -> None: data["select_regulation_control"] = reg_control data["regulation_control_modes"] = ["active", "passive", "off"] data["thermostat"].pop("regulation_control") + self._count += 1 def _preset(self, loc_id: str) -> str | None: """Helper-function for smile.py: device_data_climate(). From 7f42767f8a2a8fda86de662e9a98c6e0b1df464c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:02:05 +0100 Subject: [PATCH 11/50] Sort --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 77f9d179a..1a0e0e039 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -842,7 +842,7 @@ def _regulation_control(self, data: GwEntityData) -> None: """ if (reg_control := data["thermostat"].get("regulation_control")) is not None: data["select_regulation_control"] = reg_control - data["regulation_control_modes"] = ["active", "passive", "off"] + data["regulation_control_modes"] = ["active", "off", "passive"] data["thermostat"].pop("regulation_control") self._count += 1 From 2c2e016b57d03443f40705b440d2c5dc0b055781 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:04:28 +0100 Subject: [PATCH 12/50] Correct entity_items asserts --- tests/test_adam.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index e5bef690a..2caba0a0e 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -323,8 +323,8 @@ async def test_adam_heatpump_cooling(self): testdata = await self.load_testdata(SMILE_TYPE, self.smile_setup) server, api, client = await self.connect_wrapper() - test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 519 + await self.device_test(api, "2022-01-02 00:00:01", testdata) + assert self.entity_items == 538 assert test_items == self.entity_items assert self.cooling_present assert self._cooling_enabled @@ -347,8 +347,8 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): smile_version=None, ) - test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 68 + await self.device_test(api, "2022-01-02 00:00:01", testdata) + assert self.entity_items == 69 assert test_items == self.entity_items assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -414,7 +414,7 @@ async def test_adam_plus_jip(self): test_items = await self.device_test(api, "2021-06-20 00:00:01", testdata) assert api.gateway_id == "b5c2386c6f6342669e50fe49dd05b188" - assert self.entity_items == 261 + assert self.entity_items == 269 assert test_items == self.entity_items # Negative test From ae37d617e510675d483fb880612f3147709c739c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:07:43 +0100 Subject: [PATCH 13/50] Save updated fixtures --- fixtures/adam_heatpump_cooling/data.json | 20 +++++++++++++++++++ fixtures/adam_jip/data.json | 8 ++++++++ .../data.json | 2 ++ fixtures/adam_plus_anna_new/data.json | 4 ++++ .../data.json | 4 ++++ 5 files changed, 38 insertions(+) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 04b033f2a..ffe6af6b4 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -13,6 +13,8 @@ "model": "ThermoZone", "name": "Slaapkamer SJ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -131,6 +133,8 @@ "model": "ThermoZone", "name": "Slaapkamer DB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -245,6 +249,8 @@ "model": "ThermoZone", "name": "Badkamer 2", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "Werkdag schema", "sensors": { "electricity_consumed": 0.0, @@ -387,6 +393,8 @@ "model": "ThermoZone", "name": "Badkamer 1", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "Werkdag schema", "sensors": { "electricity_consumed": 0.0, @@ -419,6 +427,8 @@ "model": "ThermoZone", "name": "Slaapkamer RB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 3.13, @@ -470,6 +480,8 @@ "model": "ThermoZone", "name": "Slaapkamer SQ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -522,6 +534,8 @@ "model": "ThermoZone", "name": "Keuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "Werkdag schema", "sensors": { "electricity_consumed": 2.13, @@ -554,6 +568,8 @@ "model": "ThermoZone", "name": "Bijkeuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -684,6 +700,8 @@ "model": "ThermoZone", "name": "Slaapkamer JM", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -786,6 +804,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "Werkdag schema", "sensors": { "electricity_consumed": 0.0, diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index d8caff4b4..4bc810cb8 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -8,6 +8,8 @@ "model": "ThermoZone", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 24.2 @@ -33,6 +35,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 27.4 @@ -248,6 +252,8 @@ "model": "ThermoZone", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 30.0 @@ -297,6 +303,8 @@ "model": "ThermoZone", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 30.0 diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index 4803aad72..2ba69e272 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -91,6 +91,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "Werkdag schema", "sensors": { "electricity_consumed": 0.0, diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index 421d5387d..ee706b4de 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -279,6 +279,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "Weekschema", "sensors": { "electricity_consumed": 60.8, @@ -316,6 +318,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 93710a1fa..1d91dc98b 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -232,6 +232,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "off", "sensors": { "electricity_consumed": 149.9, @@ -265,6 +267,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, From 73f4d56ad539a586726685f147de6eca3b38a871 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:09:43 +0100 Subject: [PATCH 14/50] Ruff fixes --- plugwise/helper.py | 2 +- plugwise/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 1a0e0e039..37d0d3131 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -797,7 +797,7 @@ def _control_state(self, data: GwEntityData) -> str | bool: Represents the heating/cooling demand-state of the local primary thermostat. Note: heating or cooling can still be active when the setpoint has been reached. """ - + if (ctrl_state := data["thermostat"].get("control_state")) is not None: data["thermostat"].pop("control_state") self._count -= 1 diff --git a/plugwise/util.py b/plugwise/util.py index 47d35f90f..a13a7798b 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -197,7 +197,7 @@ def format_measure(measure: str, unit: str) -> float | int | str: """Format measure to correct type.""" try: float_measure = float(measure) - except ValueError as exc: + except ValueError: return measure # return string if unit == PERCENTAGE and 0 < float_measure <= 1: From c4385261e5026c755e0ab02ac5743c23fbab6099 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:31:21 +0100 Subject: [PATCH 15/50] Amend typing --- plugwise/constants.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugwise/constants.py b/plugwise/constants.py index 8c13c1dcb..920cd43f7 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -506,7 +506,9 @@ class ThermoLoc(TypedDict, total=False): class ActuatorData(TypedDict, total=False): """Actuator data for thermostat types.""" + control_state: str lower_bound: float + regulation_control: str resolution: float setpoint: float setpoint_high: float @@ -555,6 +557,8 @@ class GwEntityData(TypedDict, total=False): select_regulation_mode: str # Thermostat-related + regulation_control_modes: list[str] + select_regulation_control: str thermostats: dict[str, list[str]] # Presets: active_preset: str | None From 8c328445e29bb654792d1ca05c502a52042d3369 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:39:33 +0100 Subject: [PATCH 16/50] Revert format_measure() update, move try-except to helper.py --- plugwise/helper.py | 5 ++++- plugwise/util.py | 8 ++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 37d0d3131..69198715e 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -519,8 +519,11 @@ def _get_actuator_functionalities( key = "setpoint" act_key = cast(ActuatorDataType, key) - temp_dict[act_key] = format_measure(pw_function.text, TEMP_CELSIUS) self._count += 1 + try: + temp_dict[act_key] = format_measure(pw_function.text, TEMP_CELSIUS) + except ValueError: + temp_dict[act_key] = str(pw_function.text) if temp_dict: # If domestic_hot_water_setpoint is present as actuator, diff --git a/plugwise/util.py b/plugwise/util.py index a13a7798b..1b4a3efaf 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -193,13 +193,9 @@ def escape_illegal_xml_characters(xmldata: str) -> str: return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata) -def format_measure(measure: str, unit: str) -> float | int | str: +def format_measure(measure: str, unit: str) -> float | int: """Format measure to correct type.""" - try: - float_measure = float(measure) - except ValueError: - return measure # return string - + float_measure = float(measure) if unit == PERCENTAGE and 0 < float_measure <= 1: return int(float_measure * 100) From f2b99763c6ad6bdef481780697b59126a63e64f4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:47:24 +0100 Subject: [PATCH 17/50] Force str(control_state) --- plugwise/data.py | 2 +- plugwise/helper.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index f37441956..3ab9f53f4 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -170,7 +170,7 @@ def _get_location_data(self, loc_id: str) -> GwEntityData: "heating", "preheating", ): - data["control_state"] = ctrl_state + data["control_state"] = str(ctrl_state) if "setpoint" in data["sensors"]: data["sensors"].pop("setpoint") # remove, only used in _control_state() diff --git a/plugwise/helper.py b/plugwise/helper.py index 69198715e..9e04fd44d 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -521,7 +521,9 @@ def _get_actuator_functionalities( act_key = cast(ActuatorDataType, key) self._count += 1 try: - temp_dict[act_key] = format_measure(pw_function.text, TEMP_CELSIUS) + temp_dict[act_key] = format_measure( + pw_function.text, TEMP_CELSIUS + ) except ValueError: temp_dict[act_key] = str(pw_function.text) From 83e5c575a4d1578903367e2b1c2bb7ce9ff4ed59 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 10:49:12 +0100 Subject: [PATCH 18/50] Save updated manual fixtures --- fixtures/m_adam_cooling/data.json | 4 ++++ fixtures/m_adam_heating/data.json | 4 ++++ fixtures/m_adam_jip/data.json | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json index 162bc1d2c..f504a326a 100644 --- a/fixtures/m_adam_cooling/data.json +++ b/fixtures/m_adam_cooling/data.json @@ -195,6 +195,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "off", "sensors": { "electricity_consumed": 60.8, @@ -232,6 +234,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json index 87378f5b2..578e93895 100644 --- a/fixtures/m_adam_heating/data.json +++ b/fixtures/m_adam_heating/data.json @@ -194,6 +194,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": "off", "sensors": { "electricity_consumed": 60.8, @@ -231,6 +233,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "passive", "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json index 50b9a8109..6d91ea131 100644 --- a/fixtures/m_adam_jip/data.json +++ b/fixtures/m_adam_jip/data.json @@ -7,6 +7,8 @@ "model": "ThermoZone", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 24.2 @@ -32,6 +34,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 27.4 @@ -247,6 +251,8 @@ "model": "ThermoZone", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 30.0 @@ -296,6 +302,8 @@ "model": "ThermoZone", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "regulation_control_modes": ["active", "off", "passive"], + "select_regulation_control": "active", "select_schedule": null, "sensors": { "temperature": 30.0 From 31067c8bdb2aa099f4bbcb2284c2b58de2dc037d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 16:46:08 +0100 Subject: [PATCH 19/50] Improve datakey names Zone profile in the Plugwise App --- plugwise/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 9e04fd44d..a90933b4c 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -846,8 +846,8 @@ def _regulation_control(self, data: GwEntityData) -> None: Adam: collect the thermostat regulation_mode of a location. """ if (reg_control := data["thermostat"].get("regulation_control")) is not None: - data["select_regulation_control"] = reg_control - data["regulation_control_modes"] = ["active", "off", "passive"] + data["select_zone_profile"] = reg_control + data["zone_profiles"] = ["active", "off", "passive"] data["thermostat"].pop("regulation_control") self._count += 1 From 6f5b3a1b2a82aeecd5323cacf6fdb14f83e3f998 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 16:54:15 +0100 Subject: [PATCH 20/50] Save updated fixtures --- fixtures/adam_heatpump_cooling/data.json | 60 +++++++++---------- fixtures/adam_jip/data.json | 24 ++++---- .../data.json | 6 +- fixtures/adam_plus_anna_new/data.json | 12 ++-- .../data.json | 12 ++-- 5 files changed, 57 insertions(+), 57 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index ffe6af6b4..71bfad7e2 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -13,9 +13,8 @@ "model": "ThermoZone", "name": "Slaapkamer SJ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -31,7 +30,8 @@ "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "0ca13e8176204ca7bf6f09de59f81c83": { "available": true, @@ -133,9 +133,8 @@ "model": "ThermoZone", "name": "Slaapkamer DB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -151,7 +150,8 @@ "primary": ["47e2c550a33846b680725aa3fb229473"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "2e0fc4db2a6d4cbeb7cf786143543961": { "available": true, @@ -249,9 +249,8 @@ "model": "ThermoZone", "name": "Badkamer 2", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "Werkdag schema", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "temperature": 21.9 @@ -266,7 +265,8 @@ "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "5ead63c65e5f44e7870ba2bd680ceb9e": { "available": true, @@ -393,9 +393,8 @@ "model": "ThermoZone", "name": "Badkamer 1", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "Werkdag schema", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -411,7 +410,8 @@ "primary": ["eac5db95d97241f6b17790897847ccf5"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "93ac3f7bf25342f58cbb77c4a99ac0b3": { "active_preset": "away", @@ -427,9 +427,8 @@ "model": "ThermoZone", "name": "Slaapkamer RB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 3.13, "temperature": 20.7 @@ -444,7 +443,8 @@ "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "96714ad90fc948bcbcb5021c4b9f5ae9": { "available": true, @@ -480,9 +480,8 @@ "model": "ThermoZone", "name": "Slaapkamer SQ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -498,7 +497,8 @@ "primary": ["beb32da072274e698146db8b022f3c36"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "a03b6e8e76dd4646af1a77c31dd9370c": { "available": true, @@ -534,9 +534,8 @@ "model": "ThermoZone", "name": "Keuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 2.13, "electricity_produced": 0.0, @@ -552,7 +551,8 @@ "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "b52908550469425b812c87f766fe5303": { "active_preset": "away", @@ -568,9 +568,8 @@ "model": "ThermoZone", "name": "Bijkeuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -586,7 +585,8 @@ "primary": ["1053c8bbf8be43c6921742b146a625f1"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "bbcffa48019f4b09b8368bbaf9559e68": { "available": true, @@ -700,9 +700,8 @@ "model": "ThermoZone", "name": "Slaapkamer JM", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -718,7 +717,8 @@ "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "ea8372c0e3ad4622ad45a041d02425f5": { "available": true, @@ -804,9 +804,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -822,6 +821,7 @@ "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index 4bc810cb8..da7df0e27 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -8,9 +8,8 @@ "model": "ThermoZone", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 24.2 }, @@ -24,7 +23,8 @@ "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], "secondary": ["356b65335e274d769c338223e7af9c33"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -35,9 +35,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 27.4 }, @@ -51,7 +50,8 @@ "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -252,9 +252,8 @@ "model": "ThermoZone", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -268,7 +267,8 @@ "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -303,9 +303,8 @@ "model": "ThermoZone", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -319,7 +318,8 @@ "primary": ["a6abc6a129ee499c88a4d420cc413b47"], "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "e4684553153b44afbef2200885f379dc": { "available": true, diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index 2ba69e272..f822e33d8 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -91,9 +91,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -109,6 +108,7 @@ "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index ee706b4de..ee4ecd743 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -279,9 +279,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "Weekschema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, "electricity_produced": 0.0, @@ -301,7 +300,8 @@ ], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -318,9 +318,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -336,6 +335,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 1d91dc98b..8d07fdc92 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -232,9 +232,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 149.9, "electricity_produced": 0.0, @@ -250,7 +249,8 @@ "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "home", @@ -267,9 +267,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -285,6 +284,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } From a1221343d4da48723978f8fdec385664cea84c48 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 16:55:36 +0100 Subject: [PATCH 21/50] Update typing --- plugwise/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 920cd43f7..79bbed153 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -557,9 +557,9 @@ class GwEntityData(TypedDict, total=False): select_regulation_mode: str # Thermostat-related - regulation_control_modes: list[str] - select_regulation_control: str + select_zone_profile: str thermostats: dict[str, list[str]] + zone_profiles: list[str] # Presets: active_preset: str | None preset_modes: list[str] | None From 93075151ea5e44f4537f54bb856a0ad6dad1c904 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 16:56:23 +0100 Subject: [PATCH 22/50] Save updated manual fixtures --- fixtures/m_adam_cooling/data.json | 12 ++++++------ fixtures/m_adam_heating/data.json | 12 ++++++------ fixtures/m_adam_jip/data.json | 24 ++++++++++++------------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json index f504a326a..fdd52b1ef 100644 --- a/fixtures/m_adam_cooling/data.json +++ b/fixtures/m_adam_cooling/data.json @@ -195,9 +195,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, "electricity_produced": 0.0, @@ -217,7 +216,8 @@ ], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -234,9 +234,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -252,6 +251,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json index 578e93895..2f3951c0c 100644 --- a/fixtures/m_adam_heating/data.json +++ b/fixtures/m_adam_heating/data.json @@ -194,9 +194,8 @@ "model": "ThermoZone", "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, "electricity_produced": 0.0, @@ -216,7 +215,8 @@ ], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -233,9 +233,8 @@ "model": "ThermoZone", "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "passive", "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -251,6 +250,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json index 6d91ea131..c9ffb7395 100644 --- a/fixtures/m_adam_jip/data.json +++ b/fixtures/m_adam_jip/data.json @@ -7,9 +7,8 @@ "model": "ThermoZone", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 24.2 }, @@ -23,7 +22,8 @@ "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], "secondary": ["356b65335e274d769c338223e7af9c33"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -34,9 +34,8 @@ "model": "ThermoZone", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 27.4 }, @@ -50,7 +49,8 @@ "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -251,9 +251,8 @@ "model": "ThermoZone", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -267,7 +266,8 @@ "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -302,9 +302,8 @@ "model": "ThermoZone", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "regulation_control_modes": ["active", "off", "passive"], - "select_regulation_control": "active", "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -318,7 +317,8 @@ "primary": ["a6abc6a129ee499c88a4d420cc413b47"], "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "e4684553153b44afbef2200885f379dc": { "available": true, From 95e9b876822742651f7d0ea018c82cc34e4bbec4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 18:55:42 +0100 Subject: [PATCH 23/50] Update related adam-test-jsons --- tests/data/adam/adam_heatpump_cooling.json | 40 ++++++++++++++----- tests/data/adam/adam_jip.json | 16 ++++++-- .../adam_onoff_cooling_fake_firmware.json | 4 +- tests/data/adam/adam_plus_anna_new.json | 8 +++- .../adam_plus_anna_new_regulation_off.json | 8 +++- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index 04b033f2a..71bfad7e2 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.json @@ -14,6 +14,7 @@ "name": "Slaapkamer SJ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -29,7 +30,8 @@ "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "0ca13e8176204ca7bf6f09de59f81c83": { "available": true, @@ -132,6 +134,7 @@ "name": "Slaapkamer DB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -147,7 +150,8 @@ "primary": ["47e2c550a33846b680725aa3fb229473"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "2e0fc4db2a6d4cbeb7cf786143543961": { "available": true, @@ -246,6 +250,7 @@ "name": "Badkamer 2", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "temperature": 21.9 @@ -260,7 +265,8 @@ "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "5ead63c65e5f44e7870ba2bd680ceb9e": { "available": true, @@ -388,6 +394,7 @@ "name": "Badkamer 1", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -403,7 +410,8 @@ "primary": ["eac5db95d97241f6b17790897847ccf5"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "93ac3f7bf25342f58cbb77c4a99ac0b3": { "active_preset": "away", @@ -420,6 +428,7 @@ "name": "Slaapkamer RB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 3.13, "temperature": 20.7 @@ -434,7 +443,8 @@ "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "96714ad90fc948bcbcb5021c4b9f5ae9": { "available": true, @@ -471,6 +481,7 @@ "name": "Slaapkamer SQ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -486,7 +497,8 @@ "primary": ["beb32da072274e698146db8b022f3c36"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "a03b6e8e76dd4646af1a77c31dd9370c": { "available": true, @@ -523,6 +535,7 @@ "name": "Keuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 2.13, "electricity_produced": 0.0, @@ -538,7 +551,8 @@ "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "b52908550469425b812c87f766fe5303": { "active_preset": "away", @@ -555,6 +569,7 @@ "name": "Bijkeuken", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -570,7 +585,8 @@ "primary": ["1053c8bbf8be43c6921742b146a625f1"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "bbcffa48019f4b09b8368bbaf9559e68": { "available": true, @@ -685,6 +701,7 @@ "name": "Slaapkamer JM", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -700,7 +717,8 @@ "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "ea8372c0e3ad4622ad45a041d02425f5": { "available": true, @@ -787,6 +805,7 @@ "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -802,6 +821,7 @@ "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index d8caff4b4..da7df0e27 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -9,6 +9,7 @@ "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 24.2 }, @@ -22,7 +23,8 @@ "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], "secondary": ["356b65335e274d769c338223e7af9c33"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -34,6 +36,7 @@ "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 27.4 }, @@ -47,7 +50,8 @@ "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -249,6 +253,7 @@ "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -262,7 +267,8 @@ "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -298,6 +304,7 @@ "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, + "select_zone_profile": "active", "sensors": { "temperature": 30.0 }, @@ -311,7 +318,8 @@ "primary": ["a6abc6a129ee499c88a4d420cc413b47"], "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "e4684553153b44afbef2200885f379dc": { "available": true, diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index 4803aad72..f822e33d8 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.json @@ -92,6 +92,7 @@ "name": "Woonkamer", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -107,6 +108,7 @@ "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index 421d5387d..ee4ecd743 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -280,6 +280,7 @@ "name": "Living room", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], "select_schedule": "Weekschema", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 60.8, "electricity_produced": 0.0, @@ -299,7 +300,8 @@ ], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -317,6 +319,7 @@ "name": "Bathroom", "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -332,6 +335,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } diff --git a/tests/data/adam/adam_plus_anna_new_regulation_off.json b/tests/data/adam/adam_plus_anna_new_regulation_off.json index 93710a1fa..8d07fdc92 100644 --- a/tests/data/adam/adam_plus_anna_new_regulation_off.json +++ b/tests/data/adam/adam_plus_anna_new_regulation_off.json @@ -233,6 +233,7 @@ "name": "Living room", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", + "select_zone_profile": "active", "sensors": { "electricity_consumed": 149.9, "electricity_produced": 0.0, @@ -248,7 +249,8 @@ "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], "secondary": [] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "home", @@ -266,6 +268,7 @@ "name": "Bathroom", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", + "select_zone_profile": "passive", "sensors": { "electricity_consumed": 0.0, "electricity_produced": 0.0, @@ -281,6 +284,7 @@ "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], "secondary": ["1772a4ea304041adb83f357b751341ff"] }, - "vendor": "Plugwise" + "vendor": "Plugwise", + "zone_profiles": ["active", "off", "passive"] } } From 2d7befc9689cb74038e7cb2a8fcab2f73087e0ed Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 18:57:24 +0100 Subject: [PATCH 24/50] Fix entity_items assert --- tests/test_adam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index 2caba0a0e..25e79fc6b 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -324,7 +324,7 @@ async def test_adam_heatpump_cooling(self): server, api, client = await self.connect_wrapper() await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 538 + assert self.entity_items == 539 assert test_items == self.entity_items assert self.cooling_present assert self._cooling_enabled From 2e182856ccc6a700eefc5794f46879d9e063e4b8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 19:00:11 +0100 Subject: [PATCH 25/50] Fix missing test-updates after rebase --- tests/test_adam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index 25e79fc6b..5ea48f7b1 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -323,7 +323,7 @@ async def test_adam_heatpump_cooling(self): testdata = await self.load_testdata(SMILE_TYPE, self.smile_setup) server, api, client = await self.connect_wrapper() - await self.device_test(api, "2022-01-02 00:00:01", testdata) + test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) assert self.entity_items == 539 assert test_items == self.entity_items assert self.cooling_present @@ -347,7 +347,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): smile_version=None, ) - await self.device_test(api, "2022-01-02 00:00:01", testdata) + test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) assert self.entity_items == 69 assert test_items == self.entity_items assert self.cooling_present From f983a9bfd70bb379d5f1d6689ee28e426922be52 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 19:01:09 +0100 Subject: [PATCH 26/50] Fix 2nd entity_items assert --- fixtures/adam_heatpump_cooling/data.json | 186 +++++++++++++++--- .../adam_multiple_devices_per_zone/data.json | 68 +++++-- .../data.json | 24 ++- fixtures/adam_plus_anna_new/data.json | 49 ++++- .../data.json | 53 ++++- fixtures/adam_zone_per_device/data.json | 76 +++++-- tests/test_adam.py | 2 +- 7 files changed, 379 insertions(+), 79 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 71bfad7e2..4075bf756 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -12,7 +12,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer SJ", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -27,11 +33,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], + "primary": [ + "d3a276aeb3114a509bab1e4bf8c40348" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "0ca13e8176204ca7bf6f09de59f81c83": { "available": true, @@ -132,7 +144,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer DB", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -147,11 +165,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["47e2c550a33846b680725aa3fb229473"], + "primary": [ + "47e2c550a33846b680725aa3fb229473" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "2e0fc4db2a6d4cbeb7cf786143543961": { "available": true, @@ -248,7 +272,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer 2", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { @@ -262,11 +292,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], + "primary": [ + "f04c985c11ad4848b8fcd710343f9dcf" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "5ead63c65e5f44e7870ba2bd680ceb9e": { "available": true, @@ -294,7 +330,11 @@ }, "dev_class": "gateway", "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], + "gateway_modes": [ + "away", + "full", + "vacation" + ], "hardware": "AME Smile 2.0 board", "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", @@ -392,7 +432,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer 1", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { @@ -407,11 +453,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["eac5db95d97241f6b17790897847ccf5"], + "primary": [ + "eac5db95d97241f6b17790897847ccf5" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "93ac3f7bf25342f58cbb77c4a99ac0b3": { "active_preset": "away", @@ -426,7 +478,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer RB", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -440,11 +498,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], + "primary": [ + "c4ed311d54e341f58b4cdd201d1fde7e" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "96714ad90fc948bcbcb5021c4b9f5ae9": { "available": true, @@ -479,7 +543,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer SQ", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -494,11 +564,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["beb32da072274e698146db8b022f3c36"], + "primary": [ + "beb32da072274e698146db8b022f3c36" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "a03b6e8e76dd4646af1a77c31dd9370c": { "available": true, @@ -533,7 +609,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Keuken", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -548,11 +630,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], + "primary": [ + "ea8372c0e3ad4622ad45a041d02425f5" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "b52908550469425b812c87f766fe5303": { "active_preset": "away", @@ -567,7 +655,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bijkeuken", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "active", "sensors": { @@ -582,11 +676,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["1053c8bbf8be43c6921742b146a625f1"], + "primary": [ + "1053c8bbf8be43c6921742b146a625f1" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "bbcffa48019f4b09b8368bbaf9559e68": { "available": true, @@ -699,7 +799,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer JM", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -714,11 +820,17 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], + "primary": [ + "7fda9f84f01342f8afe9ebbbbff30c0f" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "ea8372c0e3ad4622ad45a041d02425f5": { "available": true, @@ -803,7 +915,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -818,10 +936,16 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], + "primary": [ + "ca79d23ae0094120b877558734cff85c" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] } } diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index ab49c5a65..1aba240c1 100644 --- a/fixtures/adam_multiple_devices_per_zone/data.json +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -35,7 +35,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "Badkamer Schema", "sensors": { "temperature": 18.9 @@ -70,7 +76,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bios", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -84,8 +96,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -125,7 +141,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Garage", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "off", "sensors": { "temperature": 15.6 @@ -137,7 +159,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -273,7 +297,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Jessie", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "CV Jessie", "sensors": { "temperature": 17.2 @@ -285,8 +315,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -418,7 +452,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.6, @@ -432,8 +472,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index f822e33d8..117954c61 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -42,7 +42,11 @@ }, "dev_class": "gateway", "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], + "gateway_modes": [ + "away", + "full", + "vacation" + ], "hardware": "AME Smile 2.0 board", "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", @@ -90,7 +94,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "preset_modes": [ + "no_frost", + "vacation", + "away", + "home", + "asleep" + ], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -105,10 +115,16 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], + "primary": [ + "ca79d23ae0094120b877558734cff85c" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] } } diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index ee4ecd743..281899134 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -187,7 +187,11 @@ }, "dev_class": "gateway", "firmware": "3.9.0", - "gateway_modes": ["away", "full", "vacation"], + "gateway_modes": [ + "away", + "full", + "vacation" + ], "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "D40FB201CBA0", @@ -195,7 +199,12 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": ["bleeding_cold", "heating", "off", "bleeding_hot"], + "regulation_modes": [ + "bleeding_cold", + "heating", + "off", + "bleeding_hot" + ], "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { @@ -278,7 +287,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "preset_modes": [ + "vacation", + "no_frost", + "asleep", + "home", + "away" + ], "select_schedule": "Weekschema", "select_zone_profile": "active", "sensors": { @@ -301,7 +316,11 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -317,7 +336,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bathroom", - "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], + "preset_modes": [ + "vacation", + "no_frost", + "asleep", + "home", + "away" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -332,10 +357,18 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] + "primary": [ + "e2f4322d57924fa090fbbc48b3a140dc" + ], + "secondary": [ + "1772a4ea304041adb83f357b751341ff" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] } } diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 8d07fdc92..3bf6fb8a1 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -161,7 +161,11 @@ }, "dev_class": "gateway", "firmware": "3.7.8", - "gateway_modes": ["away", "full", "vacation"], + "gateway_modes": [ + "away", + "full", + "vacation" + ], "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345679891", @@ -169,7 +173,12 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], + "regulation_modes": [ + "bleeding_hot", + "bleeding_cold", + "off", + "heating" + ], "select_gateway_mode": "full", "select_regulation_mode": "off", "sensors": { @@ -231,7 +240,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "preset_modes": [ + "no_frost", + "asleep", + "vacation", + "home", + "away" + ], "select_schedule": "off", "select_zone_profile": "active", "sensors": { @@ -246,11 +261,17 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "primary": [ + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "home", @@ -266,7 +287,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bathroom", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "preset_modes": [ + "no_frost", + "asleep", + "vacation", + "home", + "away" + ], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -281,10 +308,18 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] + "primary": [ + "e2f4322d57924fa090fbbc48b3a140dc" + ], + "secondary": [ + "1772a4ea304041adb83f357b751341ff" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] } } diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json index 31b8b4456..2d5be37f3 100644 --- a/fixtures/adam_zone_per_device/data.json +++ b/fixtures/adam_zone_per_device/data.json @@ -35,7 +35,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "Badkamer Schema", "sensors": { "temperature": 18.8 @@ -47,8 +53,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["f1fee6043d3642a9b0a65297455f008e"], - "secondary": ["680423ff840043738f42cc7f1ff97a36"] + "primary": [ + "f1fee6043d3642a9b0a65297455f008e" + ], + "secondary": [ + "680423ff840043738f42cc7f1ff97a36" + ] }, "vendor": "Plugwise" }, @@ -67,7 +77,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bios", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -81,8 +97,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -122,7 +142,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Garage", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "off", "sensors": { "temperature": 15.6 @@ -134,7 +160,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -270,7 +298,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Jessie", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "CV Jessie", "sensors": { "temperature": 17.1 @@ -282,8 +316,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -415,7 +453,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.8, @@ -429,8 +473,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, diff --git a/tests/test_adam.py b/tests/test_adam.py index 5ea48f7b1..44598ee49 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -348,7 +348,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): ) test_items = await self.device_test(api, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 69 + assert self.entity_items == 70 assert test_items == self.entity_items assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present From 0ee8fd62dd91fb43f88cba07abc7e863e23aebe5 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 19:01:56 +0100 Subject: [PATCH 27/50] Save fixture updates --- fixtures/adam_heatpump_cooling/data.json | 186 +++--------------- .../adam_multiple_devices_per_zone/data.json | 68 ++----- .../data.json | 24 +-- fixtures/adam_plus_anna_new/data.json | 49 +---- .../data.json | 53 +---- fixtures/adam_zone_per_device/data.json | 76 ++----- 6 files changed, 78 insertions(+), 378 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 4075bf756..71bfad7e2 100644 --- a/fixtures/adam_heatpump_cooling/data.json +++ b/fixtures/adam_heatpump_cooling/data.json @@ -12,13 +12,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer SJ", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -33,17 +27,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "d3a276aeb3114a509bab1e4bf8c40348" - ], + "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "0ca13e8176204ca7bf6f09de59f81c83": { "available": true, @@ -144,13 +132,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer DB", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -165,17 +147,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "47e2c550a33846b680725aa3fb229473" - ], + "primary": ["47e2c550a33846b680725aa3fb229473"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "2e0fc4db2a6d4cbeb7cf786143543961": { "available": true, @@ -272,13 +248,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer 2", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { @@ -292,17 +262,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "f04c985c11ad4848b8fcd710343f9dcf" - ], + "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "5ead63c65e5f44e7870ba2bd680ceb9e": { "available": true, @@ -330,11 +294,7 @@ }, "dev_class": "gateway", "firmware": "3.2.8", - "gateway_modes": [ - "away", - "full", - "vacation" - ], + "gateway_modes": ["away", "full", "vacation"], "hardware": "AME Smile 2.0 board", "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", @@ -432,13 +392,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer 1", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", "select_zone_profile": "passive", "sensors": { @@ -453,17 +407,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "eac5db95d97241f6b17790897847ccf5" - ], + "primary": ["eac5db95d97241f6b17790897847ccf5"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "93ac3f7bf25342f58cbb77c4a99ac0b3": { "active_preset": "away", @@ -478,13 +426,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer RB", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -498,17 +440,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "c4ed311d54e341f58b4cdd201d1fde7e" - ], + "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "96714ad90fc948bcbcb5021c4b9f5ae9": { "available": true, @@ -543,13 +479,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer SQ", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -564,17 +494,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "beb32da072274e698146db8b022f3c36" - ], + "primary": ["beb32da072274e698146db8b022f3c36"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "a03b6e8e76dd4646af1a77c31dd9370c": { "available": true, @@ -609,13 +533,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Keuken", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -630,17 +548,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "ea8372c0e3ad4622ad45a041d02425f5" - ], + "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "b52908550469425b812c87f766fe5303": { "active_preset": "away", @@ -655,13 +567,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bijkeuken", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "active", "sensors": { @@ -676,17 +582,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "1053c8bbf8be43c6921742b146a625f1" - ], + "primary": ["1053c8bbf8be43c6921742b146a625f1"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "bbcffa48019f4b09b8368bbaf9559e68": { "available": true, @@ -799,13 +699,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer JM", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -820,17 +714,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "7fda9f84f01342f8afe9ebbbbff30c0f" - ], + "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "ea8372c0e3ad4622ad45a041d02425f5": { "available": true, @@ -915,13 +803,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -936,16 +818,10 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ca79d23ae0094120b877558734cff85c" - ], + "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 1aba240c1..ab49c5a65 100644 --- a/fixtures/adam_multiple_devices_per_zone/data.json +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -35,13 +35,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Badkamer Schema", "sensors": { "temperature": 18.9 @@ -76,13 +70,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bios", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -96,12 +84,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -141,13 +125,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Garage", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", "sensors": { "temperature": 15.6 @@ -159,9 +137,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -297,13 +273,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Jessie", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "CV Jessie", "sensors": { "temperature": 17.2 @@ -315,12 +285,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -452,13 +418,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.6, @@ -472,12 +432,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "b59bcebaf94b499ea7d46e4a66fb62d8" - ], - "secondary": [ - "b310b72a0e354bfab43089919b9a88bf" - ] + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] }, "vendor": "Plugwise" }, diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index 117954c61..f822e33d8 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -42,11 +42,7 @@ }, "dev_class": "gateway", "firmware": "3.2.8", - "gateway_modes": [ - "away", - "full", - "vacation" - ], + "gateway_modes": ["away", "full", "vacation"], "hardware": "AME Smile 2.0 board", "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", @@ -94,13 +90,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": [ - "no_frost", - "vacation", - "away", - "home", - "asleep" - ], + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", "select_zone_profile": "active", "sensors": { @@ -115,16 +105,10 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ca79d23ae0094120b877558734cff85c" - ], + "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index 281899134..ee4ecd743 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -187,11 +187,7 @@ }, "dev_class": "gateway", "firmware": "3.9.0", - "gateway_modes": [ - "away", - "full", - "vacation" - ], + "gateway_modes": ["away", "full", "vacation"], "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "D40FB201CBA0", @@ -199,12 +195,7 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": [ - "bleeding_cold", - "heating", - "off", - "bleeding_hot" - ], + "regulation_modes": ["bleeding_cold", "heating", "off", "bleeding_hot"], "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { @@ -287,13 +278,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": [ - "vacation", - "no_frost", - "asleep", - "home", - "away" - ], + "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], "select_schedule": "Weekschema", "select_zone_profile": "active", "sensors": { @@ -316,11 +301,7 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -336,13 +317,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bathroom", - "preset_modes": [ - "vacation", - "no_frost", - "asleep", - "home", - "away" - ], + "preset_modes": ["vacation", "no_frost", "asleep", "home", "away"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -357,18 +332,10 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "e2f4322d57924fa090fbbc48b3a140dc" - ], - "secondary": [ - "1772a4ea304041adb83f357b751341ff" - ] + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 3bf6fb8a1..8d07fdc92 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -161,11 +161,7 @@ }, "dev_class": "gateway", "firmware": "3.7.8", - "gateway_modes": [ - "away", - "full", - "vacation" - ], + "gateway_modes": ["away", "full", "vacation"], "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345679891", @@ -173,12 +169,7 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": [ - "bleeding_hot", - "bleeding_cold", - "off", - "heating" - ], + "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", "select_regulation_mode": "off", "sensors": { @@ -240,13 +231,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": [ - "no_frost", - "asleep", - "vacation", - "home", - "away" - ], + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", "select_zone_profile": "active", "sensors": { @@ -261,17 +246,11 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ad4838d7d35c4d6ea796ee12ae5aedf8" - ], + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "home", @@ -287,13 +266,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bathroom", - "preset_modes": [ - "no_frost", - "asleep", - "vacation", - "home", - "away" - ], + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", "select_zone_profile": "passive", "sensors": { @@ -308,18 +281,10 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "e2f4322d57924fa090fbbc48b3a140dc" - ], - "secondary": [ - "1772a4ea304041adb83f357b751341ff" - ] + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] } } diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json index 2d5be37f3..31b8b4456 100644 --- a/fixtures/adam_zone_per_device/data.json +++ b/fixtures/adam_zone_per_device/data.json @@ -35,13 +35,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Badkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Badkamer Schema", "sensors": { "temperature": 18.8 @@ -53,12 +47,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "f1fee6043d3642a9b0a65297455f008e" - ], - "secondary": [ - "680423ff840043738f42cc7f1ff97a36" - ] + "primary": ["f1fee6043d3642a9b0a65297455f008e"], + "secondary": ["680423ff840043738f42cc7f1ff97a36"] }, "vendor": "Plugwise" }, @@ -77,13 +67,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Bios", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", "sensors": { "electricity_consumed": 0.0, @@ -97,12 +81,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -142,13 +122,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Garage", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", "sensors": { "temperature": 15.6 @@ -160,9 +134,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -298,13 +270,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Jessie", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "CV Jessie", "sensors": { "temperature": 17.1 @@ -316,12 +282,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -453,13 +415,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "GF7 Woonkamer", "sensors": { "electricity_consumed": 35.8, @@ -473,12 +429,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "b59bcebaf94b499ea7d46e4a66fb62d8" - ], - "secondary": [ - "b310b72a0e354bfab43089919b9a88bf" - ] + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] }, "vendor": "Plugwise" }, From 5dc9adc11834e16005b36f82447fb36b3b7104a6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 19:29:16 +0100 Subject: [PATCH 28/50] Rename constant for widened scope --- plugwise/constants.py | 20 ++++++++++---------- plugwise/helper.py | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 79bbed153..6677acd1f 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -250,6 +250,16 @@ ] ACTIVE_ACTUATORS: Final[tuple[str, ...]] = get_args(ActuatorType) +ACTIVE_KEYS: Final[tuple[str, ...]] = ( + "control_state", + "lower_bound", + "offset", + "regulation_control", + "resolution", + "setpoint", + "upper_bound", +) + ActuatorDataType = Literal[ "control_state", "lower_bound", @@ -288,16 +298,6 @@ ] BINARY_SENSORS: Final[tuple[str, ...]] = get_args(BinarySensorType) -LIMITS: Final[tuple[str, ...]] = ( - "control_state", - "lower_bound", - "offset", - "regulation_control", - "resolution", - "setpoint", - "upper_bound", -) - SensorType = Literal[ "battery", "cooling_activation_outdoor_temperature", diff --git a/plugwise/helper.py b/plugwise/helper.py index a90933b4c..24eda8cd7 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -10,6 +10,7 @@ from plugwise.common import SmileCommon from plugwise.constants import ( ACTIVE_ACTUATORS, + ACTIVE_KEYS, ACTUATOR_CLASSES, ADAM, ANNA, @@ -20,7 +21,6 @@ DOMAIN_OBJECTS, ENERGY_WATT_HOUR, HEATER_CENTRAL_MEASUREMENTS, - LIMITS, LOCATIONS, LOGGER, MODULE_LOCATOR, @@ -503,7 +503,7 @@ def _get_actuator_functionalities( ) is not None and updated_date_key.text is None: continue - for key in LIMITS: + for key in ACTIVE_KEYS: locator = ( f'.//actuator_functionalities/{functionality}[type="{item}"]/{key}' ) From 6fe72a846a2da850b19ee79fe624198b1ee953b3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 8 Nov 2025 19:38:10 +0100 Subject: [PATCH 29/50] Start adding set-function --- plugwise/smile.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugwise/smile.py b/plugwise/smile.py index 362a2316d..69678bbac 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -240,6 +240,8 @@ async def set_select( case "select_schedule": # schedule name corresponds to select option await self.set_schedule_state(loc_id, state, option) + case "select_zone_profile": + await self.set_zone_profile(option) async def set_dhw_mode(self, mode: str) -> None: """Set the domestic hot water heating regulation mode.""" @@ -304,6 +306,19 @@ async def set_regulation_mode(self, mode: str) -> None: uri = f"{APPLIANCES};type=gateway/regulation_mode_control" await self.call_request(uri, method="put", data=data) + async def set_zone_profile(self, profile: str) -> None: + """Set the Adam thermoszone heating profile.""" + if profile not in ("active", "off", "passive"): + raise PlugwiseError("Plugwise: invalid zone profile.") + + data = ( + "" + f"{profile}" + "" + ) + uri = self._thermostat_uri(loc_id) + await self.call_request(uri, method="put", data=data) + async def set_schedule_state( self, loc_id: str, From cbbdedab45b324c20e3fa3feb98dd9321be2752a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 08:59:45 +0100 Subject: [PATCH 30/50] Set uri and call method --- plugwise/smile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index 69678bbac..7f101427d 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -316,8 +316,8 @@ async def set_zone_profile(self, profile: str) -> None: f"{profile}" "" ) - uri = self._thermostat_uri(loc_id) - await self.call_request(uri, method="put", data=data) + uri = "{LOCATIONS};id={loc_id}/thermostat" + await self.call_request(uri, method="post", data=data) async def set_schedule_state( self, From a7ec36a45eb5299384c5b9740f889cd814f46dbf Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:02:41 +0100 Subject: [PATCH 31/50] Constant allowed zone profiles --- plugwise/constants.py | 1 + plugwise/smile.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 6677acd1f..c2e0ebccd 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -33,6 +33,7 @@ VOLUME_CUBIC_METERS_PER_HOUR: Final = "m³/h" ADAM: Final = "Adam" +ALLOWED_ZONE_PROFILES: Final(set) = ("active", "off", "passive") ANNA: Final = "Smile Anna" ANNA_P1: Final = "Smile Anna P1" DEFAULT_TIMEOUT: Final = 10 diff --git a/plugwise/smile.py b/plugwise/smile.py index 7f101427d..dc6c32735 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -11,6 +11,7 @@ from plugwise.constants import ( ADAM, + ALLOWED_ZONE_PROFILES, ANNA, APPLIANCES, DOMAIN_OBJECTS, @@ -308,7 +309,7 @@ async def set_regulation_mode(self, mode: str) -> None: async def set_zone_profile(self, profile: str) -> None: """Set the Adam thermoszone heating profile.""" - if profile not in ("active", "off", "passive"): + if profile not in ALLOWED_ZONE_PROFILES: raise PlugwiseError("Plugwise: invalid zone profile.") data = ( From d63a898040cbb9325ba0db87c28b0cd2c38fb3e0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:08:57 +0100 Subject: [PATCH 32/50] Add tinker_zone_profile() --- tests/test_init.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/test_init.py b/tests/test_init.py index fbb540c92..f904cd779 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -986,6 +986,35 @@ async def tinker_gateway_mode(api, unhappy=False): return tinker_gateway_mode_passed + @staticmethod + async def tinker_zone_profile(api, unhappy=False): + """Toggle gateway_mode to test functionality.""" + tinker_zone_profile_passed = False + for profile in ["active", "off", "passive", "!bogus"]: + warning = "" + if profile[0] == "!": + warning = " Negative test" + profile = profile[1:] + _LOGGER.info("%s", f"- Adjusting zone_profile to {profile}{warning}") + try: + await api.set_select("select_zone_profile", loc_id, profile) + _LOGGER.info(" + worked as intended") + tinker_zone_profile_passed = True + except pw_exceptions.PlugwiseError: + _LOGGER.info(" + found invalid mode, as expected") + tinker_zone_profile_passed = False + except ( + pw_exceptions.ConnectionFailedError + ): # leave for-loop at connect-error + if unhappy: + _LOGGER.info(" + failed as expected before intended failure") + return True + else: # pragma: no cover + _LOGGER.info(" - succeeded unexpectedly for some reason") + return False + + return tinker_zone_profile_passed + @staticmethod def validate_test_basics( parent_logger, From 6b382aa67a163597b3428662a309208e10ac4731 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:13:41 +0100 Subject: [PATCH 33/50] Replace constant in legacy path --- plugwise/legacy/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 87e3d951b..f095466d8 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -10,6 +10,7 @@ from plugwise.common import SmileCommon from plugwise.constants import ( ACTIVE_ACTUATORS, + ACTIVE_KEYS, ACTUATOR_CLASSES, APPLIANCES, ATTR_NAME, @@ -19,7 +20,6 @@ FAKE_APPL, FAKE_LOC, HEATER_CENTRAL_MEASUREMENTS, - LIMITS, NONE, OFF, P1_LEGACY_MEASUREMENTS, @@ -365,7 +365,7 @@ def _get_actuator_functionalities( ) is not None and updated_date_key.text is None: continue # pragma: no cover - for key in LIMITS: + for key in ACTIVE_KEYS: locator = ( f'.//actuator_functionalities/{functionality}[type="{item}"]/{key}' ) From a8d92e4f338f710031c8773ad515c8cb713716f0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:15:41 +0100 Subject: [PATCH 34/50] Add missing loc_id arg --- tests/test_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index f904cd779..b38d59675 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -987,7 +987,7 @@ async def tinker_gateway_mode(api, unhappy=False): return tinker_gateway_mode_passed @staticmethod - async def tinker_zone_profile(api, unhappy=False): + async def tinker_zone_profile(api, loc_id, unhappy=False): """Toggle gateway_mode to test functionality.""" tinker_zone_profile_passed = False for profile in ["active", "off", "passive", "!bogus"]: From 85431029467619329ae0fcd654b7f19581c196fb Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:16:45 +0100 Subject: [PATCH 35/50] Fix constant format --- plugwise/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index c2e0ebccd..9ec8e4f4f 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -33,7 +33,7 @@ VOLUME_CUBIC_METERS_PER_HOUR: Final = "m³/h" ADAM: Final = "Adam" -ALLOWED_ZONE_PROFILES: Final(set) = ("active", "off", "passive") +ALLOWED_ZONE_PROFILES: Final[tuple[str, str, str]] = ("active", "off", "passive") ANNA: Final = "Smile Anna" ANNA_P1: Final = "Smile Anna P1" DEFAULT_TIMEOUT: Final = 10 From 48784bbe4100ac5d46714ac778e45a41022ee3aa Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:30:51 +0100 Subject: [PATCH 36/50] Add zone_profile tests --- tests/test_adam.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index 44598ee49..967cb3978 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -102,7 +102,9 @@ async def test_connect_adam_plus_anna_new(self): ) assert switch_change switch_change = await self.tinker_switch( - api, "056ee145a816487eaa69243c3280f8bf", model="dhw_cm_switch" + api, + "056ee145a816487eaa69243c3280f8bf", + model="dhw_cm_switch", ) assert switch_change # Test relay without lock-attribute @@ -112,7 +114,8 @@ async def test_connect_adam_plus_anna_new(self): ) assert not switch_change switch_change = await self.tinker_switch( - api, "2568cc4b9c1e401495d4741a5f89bee1" + api, + "2568cc4b9c1e401495d4741a5f89bee1", ) assert not switch_change switch_change = await self.tinker_switch( @@ -136,6 +139,11 @@ async def test_connect_adam_plus_anna_new(self): tinkered = await self.tinker_max_boiler_temp(api) assert not tinkered + assert not await self.tinker_zone_profile( + api, + "f2bf9048bef64cc5b6d5110154e33c81", + ) + # Now change some data and change directory reading xml from # emulating reading newer dataset after an update_interval testdata_updated = await self.load_testdata( From bec4deb0f72ca6102302f995f4d299ced7e3cc89 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:40:18 +0100 Subject: [PATCH 37/50] Add missing loc_id arg --- plugwise/smile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index dc6c32735..3a93bff03 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -242,7 +242,7 @@ async def set_select( # schedule name corresponds to select option await self.set_schedule_state(loc_id, state, option) case "select_zone_profile": - await self.set_zone_profile(option) + await self.set_zone_profile(loc_id, option) async def set_dhw_mode(self, mode: str) -> None: """Set the domestic hot water heating regulation mode.""" @@ -307,7 +307,7 @@ async def set_regulation_mode(self, mode: str) -> None: uri = f"{APPLIANCES};type=gateway/regulation_mode_control" await self.call_request(uri, method="put", data=data) - async def set_zone_profile(self, profile: str) -> None: + async def set_zone_profile(self, loc_id: str, profile: str) -> None: """Set the Adam thermoszone heating profile.""" if profile not in ALLOWED_ZONE_PROFILES: raise PlugwiseError("Plugwise: invalid zone profile.") From b07a6b7f73ae4d8c6fe73b15f15b12828a4da389 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:44:54 +0100 Subject: [PATCH 38/50] Add POST router routes for locations --- tests/test_init.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_init.py b/tests/test_init.py index b38d59675..1998b656d 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -117,6 +117,7 @@ def setup_app( if not raise_timeout: app.router.add_route("POST", CORE_GATEWAYS_TAIL, self.smile_http_accept) app.router.add_route("PUT", CORE_LOCATIONS_TAIL, self.smile_http_accept) + app.router.add_route("POST", CORE_LOCATIONS_TAIL, self.smile_http_accept) app.router.add_route( "DELETE", CORE_NOTIFICATIONS_TAIL, self.smile_http_accept ) @@ -125,6 +126,7 @@ def setup_app( else: app.router.add_route("POST", CORE_GATEWAYS_TAIL, self.smile_timeout) app.router.add_route("PUT", CORE_LOCATIONS_TAIL, self.smile_timeout) + app.router.add_route("POST", CORE_LOCATIONS_TAIL, self.smile_http_accept) app.router.add_route("PUT", CORE_RULES_TAIL, self.smile_timeout) app.router.add_route("PUT", CORE_APPLIANCES_TAIL, self.smile_timeout) app.router.add_route("DELETE", CORE_NOTIFICATIONS_TAIL, self.smile_timeout) From e695f9a22ed78cb7ee021a6195417997e367e9c6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:46:34 +0100 Subject: [PATCH 39/50] Add f-string marker --- plugwise/smile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index 3a93bff03..ad6a93544 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -317,7 +317,7 @@ async def set_zone_profile(self, loc_id: str, profile: str) -> None: f"{profile}" "" ) - uri = "{LOCATIONS};id={loc_id}/thermostat" + uri = f"{LOCATIONS};id={loc_id}/thermostat" await self.call_request(uri, method="post", data=data) async def set_schedule_state( From 5e6eb36421ebfac19ec24fe40dd6e5f8f10323c5 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 09:51:15 +0100 Subject: [PATCH 40/50] Add unhappy-zone_profile test --- tests/test_adam.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_adam.py b/tests/test_adam.py index 967cb3978..c45f5a354 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -187,6 +187,12 @@ async def test_connect_adam_plus_anna_new(self): tinkered = await self.tinker_regulation_mode(api, unhappy=True) assert tinkered + assert await self.tinker_zone_profile( + api, + "f2bf9048bef64cc5b6d5110154e33c81", + unhappy=True, + ) + await api.close_connection() await self.disconnect(server, client) From 5fd3d429a6c14ad7b08b1c777c7eba100976c103 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:00:06 +0100 Subject: [PATCH 41/50] Fix time_out route --- tests/test_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index 1998b656d..1f8f3c803 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -126,7 +126,7 @@ def setup_app( else: app.router.add_route("POST", CORE_GATEWAYS_TAIL, self.smile_timeout) app.router.add_route("PUT", CORE_LOCATIONS_TAIL, self.smile_timeout) - app.router.add_route("POST", CORE_LOCATIONS_TAIL, self.smile_http_accept) + app.router.add_route("POST", CORE_LOCATIONS_TAIL, self.smile_timeout) app.router.add_route("PUT", CORE_RULES_TAIL, self.smile_timeout) app.router.add_route("PUT", CORE_APPLIANCES_TAIL, self.smile_timeout) app.router.add_route("DELETE", CORE_NOTIFICATIONS_TAIL, self.smile_timeout) From 1e4d62dbd3f8ef2f2d5fc36189b683525caddf76 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:03:54 +0100 Subject: [PATCH 42/50] Update CHANGELOG --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43cf9e472..a59ee9010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## Ongoing +## v1.10.0 -- Improve testing: compare internal and code testcounters, line up fixture and test-json format, fix a missed count. +- New feature: implement setting of a ThermoZone zone profile via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) +- Improve testing: compare internal and code testcounters, line up fixture and test-json format, fix a missed count via PR [#815](https://github.com/plugwise/python-plugwise/pull/815) ## v1.9.0 From 83de0fedfed0c4d1273ad852ae3924cffaabbf6f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:05:24 +0100 Subject: [PATCH 43/50] Improve CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a59ee9010..a524fbff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v1.10.0 -- New feature: implement setting of a ThermoZone zone profile via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) +- New feature: implement setting the ThermoZone zone profile (Adam only) via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) - Improve testing: compare internal and code testcounters, line up fixture and test-json format, fix a missed count via PR [#815](https://github.com/plugwise/python-plugwise/pull/815) ## v1.9.0 From 8f6669ff95e8f5607b688631a4d6d335c434052a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:10:42 +0100 Subject: [PATCH 44/50] Improve doc-string --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 24eda8cd7..60430bdf8 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -843,7 +843,7 @@ def _heating_valves(self) -> int | bool: def _regulation_control(self, data: GwEntityData) -> None: """Helper-function for smile.py: _get_location_data(). - Adam: collect the thermostat regulation_mode of a location. + Adam: collect the thermostat regulation_control state of a location. """ if (reg_control := data["thermostat"].get("regulation_control")) is not None: data["select_zone_profile"] = reg_control From 8637b549a5a3c40cf940de290be53d2175b3ead6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:12:28 +0100 Subject: [PATCH 45/50] Change constant definition for multi-use --- plugwise/constants.py | 2 +- plugwise/helper.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 9ec8e4f4f..d68842d5f 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -33,7 +33,7 @@ VOLUME_CUBIC_METERS_PER_HOUR: Final = "m³/h" ADAM: Final = "Adam" -ALLOWED_ZONE_PROFILES: Final[tuple[str, str, str]] = ("active", "off", "passive") +ALLOWED_ZONE_PROFILES: Final[list[str]] = ["active", "off", "passive"] ANNA: Final = "Smile Anna" ANNA_P1: Final = "Smile Anna P1" DEFAULT_TIMEOUT: Final = 10 diff --git a/plugwise/helper.py b/plugwise/helper.py index 60430bdf8..1cf97839f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -13,6 +13,7 @@ ACTIVE_KEYS, ACTUATOR_CLASSES, ADAM, + ALLOWED_ZONE_PROFILES, ANNA, ATTR_NAME, DATA, @@ -847,7 +848,7 @@ def _regulation_control(self, data: GwEntityData) -> None: """ if (reg_control := data["thermostat"].get("regulation_control")) is not None: data["select_zone_profile"] = reg_control - data["zone_profiles"] = ["active", "off", "passive"] + data["zone_profiles"] = ALLOWED_ZONE_PROFILES data["thermostat"].pop("regulation_control") self._count += 1 From 405124fba3666808235145fae96fd5d7778c2631 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:25:56 +0100 Subject: [PATCH 46/50] Add comment for _count increment --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 1cf97839f..4f1de9258 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -850,7 +850,7 @@ def _regulation_control(self, data: GwEntityData) -> None: data["select_zone_profile"] = reg_control data["zone_profiles"] = ALLOWED_ZONE_PROFILES data["thermostat"].pop("regulation_control") - self._count += 1 + self._count += 1 # Add 2, remove 1 def _preset(self, loc_id: str) -> str | None: """Helper-function for smile.py: device_data_climate(). From e25fe7f06922fe47bb476a008686141840db241b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:29:58 +0100 Subject: [PATCH 47/50] Fix lint issue --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a524fbff1..8e4538590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v1.10.0 +## v1.10.0 - New feature: implement setting the ThermoZone zone profile (Adam only) via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) - Improve testing: compare internal and code testcounters, line up fixture and test-json format, fix a missed count via PR [#815](https://github.com/plugwise/python-plugwise/pull/815) From d9af1be5ef95b50870c0176f83e20244ea687736 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 10:41:16 +0100 Subject: [PATCH 48/50] Bump to v1.10.0a0 test-version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7addd0d0..3b86ee7b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.9.0" +version = "1.10.0a0" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From cc6aa9f11a2894c5cbaa4652e6b2f37b6abbd6f2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 11:43:38 +0100 Subject: [PATCH 49/50] Set to v1.10.0 release version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b86ee7b1..bb78312fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.10.0a0" +version = "1.10.0" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From cd30b1f4db7b740c395812fc05e6e73d0b95fb91 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 9 Nov 2025 11:45:39 +0100 Subject: [PATCH 50/50] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4538590..47d6847b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## v1.10.0 -- New feature: implement setting the ThermoZone zone profile (Adam only) via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) +- New feature: implement setting Adam zone profile via PR [#814](https://github.com/plugwise/python-plugwise/pull/814) - Improve testing: compare internal and code testcounters, line up fixture and test-json format, fix a missed count via PR [#815](https://github.com/plugwise/python-plugwise/pull/815) ## v1.9.0