From 5bdb3dc1a227093146cb773db05571d3f9ce89a8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 14:32:34 +0200 Subject: [PATCH 1/8] Reduce complexity of set_switch_state() --- plugwise/smile.py | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index 8cdb1546e..df8c92486 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -37,6 +37,27 @@ from munch import Munch +def model_to_switch_items(model: str, state: str, switch: Munch) -> tuple[str, Munch]: + """Translate state and switch attributes based on model name. + + Helper function for set_switch_state(). + """ + match model: + case "dhw_cm_switch": + switch.device = "toggle" + switch.func_type = "toggle_functionality" + switch.act_type = "domestic_hot_water_comfort_mode" + case "cooling_ena_switch": + switch.device = "toggle" + switch.func_type = "toggle_functionality" + switch.act_type = "cooling_enabled" + case "lock": + switch.func = "lock" + state = "true" if state == STATE_ON else "false" + + return (state, switch) + + class SmileAPI(SmileData): """The Plugwise SmileAPI helper class for actual Plugwise devices.""" @@ -381,20 +402,7 @@ async def set_switch_state( switch.device = "relay" switch.func_type = "relay_functionality" switch.func = "state" - if model == "dhw_cm_switch": - switch.device = "toggle" - switch.func_type = "toggle_functionality" - switch.act_type = "domestic_hot_water_comfort_mode" - - if model == "cooling_ena_switch": - switch.device = "toggle" - switch.func_type = "toggle_functionality" - switch.act_type = "cooling_enabled" - - if model == "lock": - switch.func = "lock" - state = "true" if state == STATE_ON else "false" - + (state, switch) = model_to_switch_items(model, state, switch) data = ( f"<{switch.func_type}>" f"<{switch.func}>{state}" From 4b4775986b150cb6b17fb4d664446a2dbae1f8fc Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 14:48:12 +0200 Subject: [PATCH 2/8] Reduce complexity of legacy -helper _all_appliances() --- plugwise/legacy/helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index d975ac617..4b7e42cbe 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -136,8 +136,10 @@ def _all_appliances(self) -> None: continue # pragma: no cover self._create_gw_entities(appl) + self._reorder_devices() - # Place the gateway and optional heater_central devices as 1st and 2nd + def _reorder_devices(self) -> None: + """Place the gateway and optional heater_central devices as 1st and 2nd.""" for dev_class in PRIORITY_DEVICE_CLASSES: for entity_id, entity in dict(self.gw_entities).items(): if entity["dev_class"] == dev_class: From bbf3161c1e9e31732ff4b7f7c7fea20fe59b352f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 14:53:10 +0200 Subject: [PATCH 3/8] Remove unneeded brackets --- plugwise/smile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index df8c92486..970181ca1 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -55,7 +55,7 @@ def model_to_switch_items(model: str, state: str, switch: Munch) -> tuple[str, M switch.func = "lock" state = "true" if state == STATE_ON else "false" - return (state, switch) + return state, switch class SmileAPI(SmileData): @@ -402,7 +402,7 @@ async def set_switch_state( switch.device = "relay" switch.func_type = "relay_functionality" switch.func = "state" - (state, switch) = model_to_switch_items(model, state, switch) + state, switch = model_to_switch_items(model, state, switch) data = ( f"<{switch.func_type}>" f"<{switch.func}>{state}" From d98771736b9e79439fb9c9aedbd9516919a7a56a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 14:58:20 +0200 Subject: [PATCH 4/8] Implement improvement suggestion --- plugwise/legacy/helper.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 4b7e42cbe..9fcf6d88e 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -139,16 +139,14 @@ def _all_appliances(self) -> None: self._reorder_devices() def _reorder_devices(self) -> None: - """Place the gateway and optional heater_central devices as 1st and 2nd.""" + """Place the gateway and optional heater_central devices as 1st and 2nd.""" + reordered = {} for dev_class in PRIORITY_DEVICE_CLASSES: for entity_id, entity in dict(self.gw_entities).items(): if entity["dev_class"] == dev_class: - tmp_entity = entity - self.gw_entities.pop(entity_id) - cleared_dict = self.gw_entities - add_to_front = {entity_id: tmp_entity} - self.gw_entities = {**add_to_front, **cleared_dict} + reordered[entity_id] = self.gw_entities.pop(entity_id) break + self.gw_entities = {**reordered, **self.gw_entities} def _all_locations(self) -> None: """Collect all locations.""" From c4fab1738727c3e18aec6b4e0a0273eede7f9dec Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 15:04:39 +0200 Subject: [PATCH 5/8] Bump version to v1.7.7, update CHANGELOG --- CHANGELOG.md | 4 ++-- plugwise/legacy/helper.py | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b101fa22..858855752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## Ongoing +## v1.7.7 -- Implement code quality improvements as suggested by SonarCloud +- Implement code quality improvements as suggested by SonarCloud via [#762](https://github.com/plugwise/python-plugwise/pull/762), [#763](https://github.com/plugwise/python-plugwise/pull/763), [#764](https://github.com/plugwise/python-plugwise/pull/764), and [#765](https://github.com/plugwise/python-plugwise/pull/765) ## v1.7.6 diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 9fcf6d88e..922663a28 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -139,7 +139,7 @@ def _all_appliances(self) -> None: self._reorder_devices() def _reorder_devices(self) -> None: - """Place the gateway and optional heater_central devices as 1st and 2nd.""" + """Place the gateway and optional heater_central devices as 1st and 2nd.""" reordered = {} for dev_class in PRIORITY_DEVICE_CLASSES: for entity_id, entity in dict(self.gw_entities).items(): diff --git a/pyproject.toml b/pyproject.toml index ef4299677..4fc91a160 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.6" +version = "1.7.7" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From abde45864e4441a277a73bc953a0b423fd02f84e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 15:14:15 +0200 Subject: [PATCH 6/8] Move _reorder_devices() to common.py --- fixtures/adam_heatpump_cooling/data.json | 126 +++++++++++++++--- fixtures/adam_jip/data.json | 77 +++++++++-- .../adam_multiple_devices_per_zone/data.json | 68 ++++++++-- .../data.json | 18 ++- fixtures/adam_plus_anna/data.json | 17 ++- fixtures/adam_plus_anna_new/data.json | 41 +++++- .../data.json | 41 +++++- fixtures/adam_zone_per_device/data.json | 76 +++++++++-- fixtures/anna_heatpump_cooling/data.json | 13 +- .../data.json | 13 +- fixtures/anna_heatpump_heating/data.json | 13 +- fixtures/anna_v4/data.json | 14 +- fixtures/anna_v4_dhw/data.json | 14 +- fixtures/anna_v4_no_tag/data.json | 14 +- fixtures/anna_without_boiler_fw441/data.json | 14 +- plugwise/common.py | 11 ++ plugwise/legacy/helper.py | 11 -- 17 files changed, 475 insertions(+), 106 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 04b033f2a..9999ea242 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", "sensors": { "electricity_consumed": 0.0, @@ -26,7 +32,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], + "primary": [ + "d3a276aeb3114a509bab1e4bf8c40348" + ], "secondary": [] }, "vendor": "Plugwise" @@ -130,7 +138,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", "sensors": { "electricity_consumed": 0.0, @@ -144,7 +158,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["47e2c550a33846b680725aa3fb229473"], + "primary": [ + "47e2c550a33846b680725aa3fb229473" + ], "secondary": [] }, "vendor": "Plugwise" @@ -244,7 +260,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", "sensors": { "electricity_consumed": 0.0, @@ -257,7 +279,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], + "primary": [ + "f04c985c11ad4848b8fcd710343f9dcf" + ], "secondary": [] }, "vendor": "Plugwise" @@ -288,7 +312,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", @@ -386,7 +414,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", "sensors": { "electricity_consumed": 0.0, @@ -400,7 +434,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["eac5db95d97241f6b17790897847ccf5"], + "primary": [ + "eac5db95d97241f6b17790897847ccf5" + ], "secondary": [] }, "vendor": "Plugwise" @@ -418,7 +454,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", "sensors": { "electricity_consumed": 3.13, @@ -431,7 +473,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], + "primary": [ + "c4ed311d54e341f58b4cdd201d1fde7e" + ], "secondary": [] }, "vendor": "Plugwise" @@ -469,7 +513,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", "sensors": { "electricity_consumed": 0.0, @@ -483,7 +533,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["beb32da072274e698146db8b022f3c36"], + "primary": [ + "beb32da072274e698146db8b022f3c36" + ], "secondary": [] }, "vendor": "Plugwise" @@ -521,7 +573,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", "sensors": { "electricity_consumed": 2.13, @@ -535,7 +593,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], + "primary": [ + "ea8372c0e3ad4622ad45a041d02425f5" + ], "secondary": [] }, "vendor": "Plugwise" @@ -553,7 +613,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", "sensors": { "electricity_consumed": 0.0, @@ -567,7 +633,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["1053c8bbf8be43c6921742b146a625f1"], + "primary": [ + "1053c8bbf8be43c6921742b146a625f1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -683,7 +751,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", "sensors": { "electricity_consumed": 0.0, @@ -697,7 +771,9 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], + "primary": [ + "7fda9f84f01342f8afe9ebbbbff30c0f" + ], "secondary": [] }, "vendor": "Plugwise" @@ -785,7 +861,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", "sensors": { "electricity_consumed": 0.0, @@ -799,7 +881,9 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], + "primary": [ + "ca79d23ae0094120b877558734cff85c" + ], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index ba23d9418..5e72ad345 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -6,7 +6,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "sensors": { "temperature": 24.2 }, @@ -17,8 +23,12 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], - "secondary": ["356b65335e274d769c338223e7af9c33"] + "primary": [ + "1346fbd8498d4dbcab7e18d51b771f3d" + ], + "secondary": [ + "356b65335e274d769c338223e7af9c33" + ] }, "vendor": "Plugwise" }, @@ -29,7 +39,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "sensors": { "temperature": 27.4 }, @@ -40,8 +56,12 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], - "secondary": ["833de10f269c4deab58fb9df69901b4e"] + "primary": [ + "f61f1a2535f54f52ad006a3d18e459ca" + ], + "secondary": [ + "833de10f269c4deab58fb9df69901b4e" + ] }, "vendor": "Plugwise" }, @@ -218,7 +238,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": "9e4433a9d69f40b3aefd15e74395eaec", "mac_address": "012345670001", @@ -226,7 +250,12 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], + "regulation_modes": [ + "heating", + "off", + "bleeding_cold", + "bleeding_hot" + ], "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { @@ -242,7 +271,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "sensors": { "temperature": 30.0 }, @@ -253,8 +288,12 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], - "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] + "primary": [ + "6f3e9d7084214c21b9dfa46f6eeb8700" + ], + "secondary": [ + "d4496250d0e942cfa7aea3476e9070d5" + ] }, "vendor": "Plugwise" }, @@ -289,7 +328,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "sensors": { "temperature": 30.0 }, @@ -300,8 +345,12 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["a6abc6a129ee499c88a4d420cc413b47"], - "secondary": ["1da4d325838e4ad8aac12177214505c9"] + "primary": [ + "a6abc6a129ee499c88a4d420cc413b47" + ], + "secondary": [ + "1da4d325838e4ad8aac12177214505c9" + ] }, "vendor": "Plugwise" }, diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 8937cd465..84dd7ce7b 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 4803aad72..a356c6aa9 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", "sensors": { "electricity_consumed": 0.0, @@ -104,7 +114,9 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], + "primary": [ + "ca79d23ae0094120b877558734cff85c" + ], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_plus_anna/data.json b/fixtures/adam_plus_anna/data.json index fd25947a0..108b84c5f 100644 --- a/fixtures/adam_plus_anna/data.json +++ b/fixtures/adam_plus_anna/data.json @@ -1,13 +1,22 @@ { "009490cc2f674ce6b576863fbb64f867": { "active_preset": "home", - "available_schedules": ["Weekschema", "off"], + "available_schedules": [ + "Weekschema", + "off" + ], "climate_mode": "auto", "control_state": "idle", "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "Weekschema", "sensors": { "electricity_consumed": 74.2, @@ -21,7 +30,9 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ee62cad889f94e8ca3d09021f03a660b"], + "primary": [ + "ee62cad889f94e8ca3d09021f03a660b" + ], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index fd87b10ab..b98126e3a 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/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": "heating", "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": "Weekschema", "sensors": { "electricity_consumed": 149.9, @@ -245,7 +260,9 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "primary": [ + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], "secondary": [] }, "vendor": "Plugwise" @@ -264,7 +281,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": "Badkamer", "sensors": { "electricity_consumed": 0.0, @@ -278,8 +301,12 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] + "primary": [ + "e2f4322d57924fa090fbbc48b3a140dc" + ], + "secondary": [ + "1772a4ea304041adb83f357b751341ff" + ] }, "vendor": "Plugwise" } diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index 93710a1fa..e95fe8311 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", "sensors": { "electricity_consumed": 149.9, @@ -245,7 +260,9 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "primary": [ + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], "secondary": [] }, "vendor": "Plugwise" @@ -264,7 +281,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", "sensors": { "electricity_consumed": 0.0, @@ -278,8 +301,12 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] + "primary": [ + "e2f4322d57924fa090fbbc48b3a140dc" + ], + "secondary": [ + "1772a4ea304041adb83f357b751341ff" + ] }, "vendor": "Plugwise" } diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json index b53a5c357..57a94c9b5 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/fixtures/anna_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index c722045a2..f1bdd86fe 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -55,7 +55,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -64,7 +67,13 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "preset_modes": [ + "no_frost", + "home", + "away", + "asleep", + "vacation" + ], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/data.json b/fixtures/anna_heatpump_cooling_fake_firmware/data.json index 4218240cb..f08a11bba 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -55,7 +55,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -64,7 +67,13 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "preset_modes": [ + "no_frost", + "home", + "away", + "asleep", + "vacation" + ], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_heatpump_heating/data.json b/fixtures/anna_heatpump_heating/data.json index ab6bdf08e..2d90b6f12 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -60,7 +60,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -69,7 +72,13 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "preset_modes": [ + "no_frost", + "home", + "away", + "asleep", + "vacation" + ], "select_schedule": "standaard", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index 7e6f138be..a64605171 100644 --- a/fixtures/anna_v4/data.json +++ b/fixtures/anna_v4/data.json @@ -1,7 +1,11 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], + "available_schedules": [ + "Standaard", + "Thuiswerken", + "off" + ], "climate_mode": "heat", "control_state": "heating", "dev_class": "thermostat", @@ -10,7 +14,13 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "preset_modes": [ + "vacation", + "no_frost", + "away", + "asleep", + "home" + ], "select_schedule": "off", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json index a560de161..677d0a622 100644 --- a/fixtures/anna_v4_dhw/data.json +++ b/fixtures/anna_v4_dhw/data.json @@ -1,7 +1,11 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], + "available_schedules": [ + "Standaard", + "Thuiswerken", + "off" + ], "climate_mode": "heat", "control_state": "idle", "dev_class": "thermostat", @@ -10,7 +14,13 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "preset_modes": [ + "vacation", + "no_frost", + "away", + "asleep", + "home" + ], "select_schedule": "off", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json index 513e7ce20..926b858e2 100644 --- a/fixtures/anna_v4_no_tag/data.json +++ b/fixtures/anna_v4_no_tag/data.json @@ -1,7 +1,11 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], + "available_schedules": [ + "Standaard", + "Thuiswerken", + "off" + ], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -10,7 +14,13 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "preset_modes": [ + "vacation", + "no_frost", + "away", + "asleep", + "home" + ], "select_schedule": "Thuiswerken", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_without_boiler_fw441/data.json b/fixtures/anna_without_boiler_fw441/data.json index 7e0b7cc4f..7cc9eaff3 100644 --- a/fixtures/anna_without_boiler_fw441/data.json +++ b/fixtures/anna_without_boiler_fw441/data.json @@ -1,7 +1,11 @@ { "7ffbb3ab4b6c4ab2915d7510f7bf8fe9": { "active_preset": "home", - "available_schedules": ["Test", "Normaal", "off"], + "available_schedules": [ + "Test", + "Normaal", + "off" + ], "climate_mode": "auto", "control_state": "idle", "dev_class": "thermostat", @@ -10,7 +14,13 @@ "location": "c34c6864216446528e95d88985e714cc", "model": "ThermoTouch", "name": "Anna", - "preset_modes": ["no_frost", "asleep", "away", "vacation", "home"], + "preset_modes": [ + "no_frost", + "asleep", + "away", + "vacation", + "home" + ], "select_schedule": "Normaal", "sensors": { "illuminance": 0.25, diff --git a/plugwise/common.py b/plugwise/common.py index 933a2d6c2..9534a2263 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -10,6 +10,7 @@ from plugwise.constants import ( ANNA, NONE, + PRIORITY_DEVICE_CLASSES, SPECIAL_PLUG_TYPES, SWITCH_GROUP_TYPES, ApplianceType, @@ -152,6 +153,16 @@ def _create_gw_entities(self, appl: Munch) -> None: self.gw_entities[appl.entity_id][appl_key] = value self._count += 1 + def _reorder_devices(self) -> None: + """Place the gateway and optional heater_central devices as 1st and 2nd.""" + reordered = {} + for dev_class in PRIORITY_DEVICE_CLASSES: + for entity_id, entity in dict(self.gw_entities).items(): + if entity["dev_class"] == dev_class: + reordered[entity_id] = self.gw_entities.pop(entity_id) + break + self.gw_entities = {**reordered, **self.gw_entities} + def _entity_switching_group(self, entity: GwEntityData, data: GwEntityData) -> None: """Helper-function for _get_device_zone_data(). diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 922663a28..d5e6918ab 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -23,7 +23,6 @@ NONE, OFF, P1_LEGACY_MEASUREMENTS, - PRIORITY_DEVICE_CLASSES, TEMP_CELSIUS, THERMOSTAT_CLASSES, UOM, @@ -138,16 +137,6 @@ def _all_appliances(self) -> None: self._create_gw_entities(appl) self._reorder_devices() - def _reorder_devices(self) -> None: - """Place the gateway and optional heater_central devices as 1st and 2nd.""" - reordered = {} - for dev_class in PRIORITY_DEVICE_CLASSES: - for entity_id, entity in dict(self.gw_entities).items(): - if entity["dev_class"] == dev_class: - reordered[entity_id] = self.gw_entities.pop(entity_id) - break - self.gw_entities = {**reordered, **self.gw_entities} - def _all_locations(self) -> None: """Collect all locations.""" loc = Munch() From ffca9bce6ec2a17d93d3d02690cadee8fa67d71a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 15:18:12 +0200 Subject: [PATCH 7/8] Reuse function in helper.py, clear old function --- plugwise/constants.py | 2 +- plugwise/helper.py | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index 4e1becd56..4710229e8 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -86,7 +86,7 @@ MODULE_LOCATOR: Final = "./logs/point_log/*[@id]" NONE: Final = "None" OFF: Final = "off" -PRIORITY_DEVICE_CLASSES = ("heater_central", "gateway") +PRIORITY_DEVICE_CLASSES = ("gateway", "heater_central") # XML data paths APPLIANCES: Final = "/core/appliances" diff --git a/plugwise/helper.py b/plugwise/helper.py index 1b66af34b..16ef1f0a3 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -28,7 +28,6 @@ NONE, OFF, P1_MEASUREMENTS, - PRIORITY_DEVICE_CLASSES, TEMP_CELSIUS, THERMOSTAT_CLASSES, TOGGLES, @@ -160,7 +159,7 @@ def _all_appliances(self) -> None: self._get_p1_smartmeter_info() # Sort the gw_entities - self._sort_gw_entities() + self._reorder_devices() def _get_p1_smartmeter_info(self) -> None: """For P1 collect the connected SmartMeter info from the Home/building location. @@ -193,18 +192,6 @@ def _get_p1_smartmeter_info(self) -> None: self._create_gw_entities(appl) - def _sort_gw_entities(self) -> None: - """Place the gateway and optional heater_central entities as 1st and 2nd.""" - for dev_class in PRIORITY_DEVICE_CLASSES: - for entity_id, entity in dict(self.gw_entities).items(): - if entity["dev_class"] == dev_class: - priority_entity = entity - self.gw_entities.pop(entity_id) - other_entities = self.gw_entities - priority_entities = {entity_id: priority_entity} - self.gw_entities = {**priority_entities, **other_entities} - break - def _all_locations(self) -> None: """Collect all locations.""" loc = Munch() From d1ee9d505216a02702b13ad8576aa5566915734d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 28 Jun 2025 15:23:54 +0200 Subject: [PATCH 8/8] Save updated fixtures --- fixtures/adam_heatpump_cooling/data.json | 126 +++--------------- fixtures/adam_jip/data.json | 77 ++--------- .../adam_multiple_devices_per_zone/data.json | 68 ++-------- .../data.json | 18 +-- fixtures/adam_plus_anna/data.json | 17 +-- fixtures/adam_plus_anna_new/data.json | 41 +----- .../data.json | 41 +----- fixtures/adam_zone_per_device/data.json | 76 ++--------- fixtures/anna_heatpump_cooling/data.json | 13 +- .../data.json | 13 +- fixtures/anna_heatpump_heating/data.json | 13 +- fixtures/anna_v4/data.json | 14 +- fixtures/anna_v4_dhw/data.json | 14 +- fixtures/anna_v4_no_tag/data.json | 14 +- fixtures/anna_without_boiler_fw441/data.json | 14 +- 15 files changed, 95 insertions(+), 464 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 9999ea242..04b033f2a 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", "sensors": { "electricity_consumed": 0.0, @@ -32,9 +26,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "d3a276aeb3114a509bab1e4bf8c40348" - ], + "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], "secondary": [] }, "vendor": "Plugwise" @@ -138,13 +130,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", "sensors": { "electricity_consumed": 0.0, @@ -158,9 +144,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "47e2c550a33846b680725aa3fb229473" - ], + "primary": ["47e2c550a33846b680725aa3fb229473"], "secondary": [] }, "vendor": "Plugwise" @@ -260,13 +244,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", "sensors": { "electricity_consumed": 0.0, @@ -279,9 +257,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "f04c985c11ad4848b8fcd710343f9dcf" - ], + "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], "secondary": [] }, "vendor": "Plugwise" @@ -312,11 +288,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", @@ -414,13 +386,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", "sensors": { "electricity_consumed": 0.0, @@ -434,9 +400,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "eac5db95d97241f6b17790897847ccf5" - ], + "primary": ["eac5db95d97241f6b17790897847ccf5"], "secondary": [] }, "vendor": "Plugwise" @@ -454,13 +418,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", "sensors": { "electricity_consumed": 3.13, @@ -473,9 +431,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "c4ed311d54e341f58b4cdd201d1fde7e" - ], + "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], "secondary": [] }, "vendor": "Plugwise" @@ -513,13 +469,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", "sensors": { "electricity_consumed": 0.0, @@ -533,9 +483,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "beb32da072274e698146db8b022f3c36" - ], + "primary": ["beb32da072274e698146db8b022f3c36"], "secondary": [] }, "vendor": "Plugwise" @@ -573,13 +521,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", "sensors": { "electricity_consumed": 2.13, @@ -593,9 +535,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "ea8372c0e3ad4622ad45a041d02425f5" - ], + "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], "secondary": [] }, "vendor": "Plugwise" @@ -613,13 +553,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", "sensors": { "electricity_consumed": 0.0, @@ -633,9 +567,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "1053c8bbf8be43c6921742b146a625f1" - ], + "primary": ["1053c8bbf8be43c6921742b146a625f1"], "secondary": [] }, "vendor": "Plugwise" @@ -751,13 +683,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", "sensors": { "electricity_consumed": 0.0, @@ -771,9 +697,7 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "7fda9f84f01342f8afe9ebbbbff30c0f" - ], + "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], "secondary": [] }, "vendor": "Plugwise" @@ -861,13 +785,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", "sensors": { "electricity_consumed": 0.0, @@ -881,9 +799,7 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ca79d23ae0094120b877558734cff85c" - ], + "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json index 5e72ad345..ba23d9418 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -6,13 +6,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { "temperature": 24.2 }, @@ -23,12 +17,8 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "1346fbd8498d4dbcab7e18d51b771f3d" - ], - "secondary": [ - "356b65335e274d769c338223e7af9c33" - ] + "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], + "secondary": ["356b65335e274d769c338223e7af9c33"] }, "vendor": "Plugwise" }, @@ -39,13 +29,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Woonkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { "temperature": 27.4 }, @@ -56,12 +40,8 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": [ - "f61f1a2535f54f52ad006a3d18e459ca" - ], - "secondary": [ - "833de10f269c4deab58fb9df69901b4e" - ] + "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], + "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, "vendor": "Plugwise" }, @@ -238,11 +218,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": "9e4433a9d69f40b3aefd15e74395eaec", "mac_address": "012345670001", @@ -250,12 +226,7 @@ "model_id": "smile_open_therm", "name": "Adam", "notifications": {}, - "regulation_modes": [ - "heating", - "off", - "bleeding_cold", - "bleeding_hot" - ], + "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "select_gateway_mode": "full", "select_regulation_mode": "heating", "sensors": { @@ -271,13 +242,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { "temperature": 30.0 }, @@ -288,12 +253,8 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "6f3e9d7084214c21b9dfa46f6eeb8700" - ], - "secondary": [ - "d4496250d0e942cfa7aea3476e9070d5" - ] + "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], + "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, "vendor": "Plugwise" }, @@ -328,13 +289,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { "temperature": 30.0 }, @@ -345,12 +300,8 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "a6abc6a129ee499c88a4d420cc413b47" - ], - "secondary": [ - "1da4d325838e4ad8aac12177214505c9" - ] + "primary": ["a6abc6a129ee499c88a4d420cc413b47"], + "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, "vendor": "Plugwise" }, diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 84dd7ce7b..8937cd465 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 a356c6aa9..4803aad72 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", "sensors": { "electricity_consumed": 0.0, @@ -114,9 +104,7 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ca79d23ae0094120b877558734cff85c" - ], + "primary": ["ca79d23ae0094120b877558734cff85c"], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_plus_anna/data.json b/fixtures/adam_plus_anna/data.json index 108b84c5f..fd25947a0 100644 --- a/fixtures/adam_plus_anna/data.json +++ b/fixtures/adam_plus_anna/data.json @@ -1,22 +1,13 @@ { "009490cc2f674ce6b576863fbb64f867": { "active_preset": "home", - "available_schedules": [ - "Weekschema", - "off" - ], + "available_schedules": ["Weekschema", "off"], "climate_mode": "auto", "control_state": "idle", "dev_class": "climate", "model": "ThermoZone", "name": "Living room", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Weekschema", "sensors": { "electricity_consumed": 74.2, @@ -30,9 +21,7 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ee62cad889f94e8ca3d09021f03a660b" - ], + "primary": ["ee62cad889f94e8ca3d09021f03a660b"], "secondary": [] }, "vendor": "Plugwise" diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index b98126e3a..fd87b10ab 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/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": "heating", "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": "Weekschema", "sensors": { "electricity_consumed": 149.9, @@ -260,9 +245,7 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ad4838d7d35c4d6ea796ee12ae5aedf8" - ], + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], "secondary": [] }, "vendor": "Plugwise" @@ -281,13 +264,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": "Badkamer", "sensors": { "electricity_consumed": 0.0, @@ -301,12 +278,8 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "e2f4322d57924fa090fbbc48b3a140dc" - ], - "secondary": [ - "1772a4ea304041adb83f357b751341ff" - ] + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] }, "vendor": "Plugwise" } diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json index e95fe8311..93710a1fa 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", "sensors": { "electricity_consumed": 149.9, @@ -260,9 +245,7 @@ "upper_bound": 35.0 }, "thermostats": { - "primary": [ - "ad4838d7d35c4d6ea796ee12ae5aedf8" - ], + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], "secondary": [] }, "vendor": "Plugwise" @@ -281,13 +264,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", "sensors": { "electricity_consumed": 0.0, @@ -301,12 +278,8 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "e2f4322d57924fa090fbbc48b3a140dc" - ], - "secondary": [ - "1772a4ea304041adb83f357b751341ff" - ] + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] }, "vendor": "Plugwise" } diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json index 57a94c9b5..b53a5c357 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" }, diff --git a/fixtures/anna_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index f1bdd86fe..c722045a2 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -55,10 +55,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -67,13 +64,7 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "no_frost", - "home", - "away", - "asleep", - "vacation" - ], + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/data.json b/fixtures/anna_heatpump_cooling_fake_firmware/data.json index f08a11bba..4218240cb 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -55,10 +55,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -67,13 +64,7 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "no_frost", - "home", - "away", - "asleep", - "vacation" - ], + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_heatpump_heating/data.json b/fixtures/anna_heatpump_heating/data.json index 2d90b6f12..ab6bdf08e 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -60,10 +60,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -72,13 +69,7 @@ "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "no_frost", - "home", - "away", - "asleep", - "vacation" - ], + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "select_schedule": "standaard", "sensors": { "cooling_activation_outdoor_temperature": 21.0, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index a64605171..7e6f138be 100644 --- a/fixtures/anna_v4/data.json +++ b/fixtures/anna_v4/data.json @@ -1,11 +1,7 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": [ - "Standaard", - "Thuiswerken", - "off" - ], + "available_schedules": ["Standaard", "Thuiswerken", "off"], "climate_mode": "heat", "control_state": "heating", "dev_class": "thermostat", @@ -14,13 +10,7 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "vacation", - "no_frost", - "away", - "asleep", - "home" - ], + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], "select_schedule": "off", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json index 677d0a622..a560de161 100644 --- a/fixtures/anna_v4_dhw/data.json +++ b/fixtures/anna_v4_dhw/data.json @@ -1,11 +1,7 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": [ - "Standaard", - "Thuiswerken", - "off" - ], + "available_schedules": ["Standaard", "Thuiswerken", "off"], "climate_mode": "heat", "control_state": "idle", "dev_class": "thermostat", @@ -14,13 +10,7 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "vacation", - "no_frost", - "away", - "asleep", - "home" - ], + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], "select_schedule": "off", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json index 926b858e2..513e7ce20 100644 --- a/fixtures/anna_v4_no_tag/data.json +++ b/fixtures/anna_v4_no_tag/data.json @@ -1,11 +1,7 @@ { "01b85360fdd243d0aaad4d6ac2a5ba7e": { "active_preset": "home", - "available_schedules": [ - "Standaard", - "Thuiswerken", - "off" - ], + "available_schedules": ["Standaard", "Thuiswerken", "off"], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -14,13 +10,7 @@ "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "vacation", - "no_frost", - "away", - "asleep", - "home" - ], + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], "select_schedule": "Thuiswerken", "sensors": { "illuminance": 60.0, diff --git a/fixtures/anna_without_boiler_fw441/data.json b/fixtures/anna_without_boiler_fw441/data.json index 7cc9eaff3..7e0b7cc4f 100644 --- a/fixtures/anna_without_boiler_fw441/data.json +++ b/fixtures/anna_without_boiler_fw441/data.json @@ -1,11 +1,7 @@ { "7ffbb3ab4b6c4ab2915d7510f7bf8fe9": { "active_preset": "home", - "available_schedules": [ - "Test", - "Normaal", - "off" - ], + "available_schedules": ["Test", "Normaal", "off"], "climate_mode": "auto", "control_state": "idle", "dev_class": "thermostat", @@ -14,13 +10,7 @@ "location": "c34c6864216446528e95d88985e714cc", "model": "ThermoTouch", "name": "Anna", - "preset_modes": [ - "no_frost", - "asleep", - "away", - "vacation", - "home" - ], + "preset_modes": ["no_frost", "asleep", "away", "vacation", "home"], "select_schedule": "Normaal", "sensors": { "illuminance": 0.25,