From 207134fd4535535338a90966659c3fc01941c8c6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 09:44:37 +0100 Subject: [PATCH 01/77] _all_appliances(): reorder code, all checks first --- plugwise/helper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 88d80e8b6..6fcc28c54 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -151,7 +151,14 @@ def _get_appliances(self) -> None: extend_plug_device_class(appl, appliance) + # Extend device_class name of Plugs (Plugwise and Aqara) - Pw-Beta Issue #739 + description = appliance.find("description").text + if description is not None and ( + "ZigBee protocol" in description or "smart plug" in description + ): + appl.pwclass = f"{appl.pwclass}_plug" # Collect appliance info, skip orphaned/removed devices + if not (appl := self._appliance_info_finder(appl, appliance)): continue From 92f9ab10e3a984c3f3ec702d158a789d55aff748 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 13:57:34 +0100 Subject: [PATCH 02/77] More reordering, improvements --- plugwise/helper.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 6fcc28c54..05fd6285a 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -145,7 +145,7 @@ def _get_appliances(self) -> None: elif appl.pwclass not in THERMOSTAT_CLASSES: appl.location = self._home_loc_id - # Don't show orphaned thermostat-types + # Don't show orphaned (no location) thermostat-types if appl.pwclass in THERMOSTAT_CLASSES and appl.location is None: continue @@ -157,8 +157,8 @@ def _get_appliances(self) -> None: "ZigBee protocol" in description or "smart plug" in description ): appl.pwclass = f"{appl.pwclass}_plug" - # Collect appliance info, skip orphaned/removed devices + # Collect appliance info, skip orphaned/removed devices if not (appl := self._appliance_info_finder(appl, appliance)): continue @@ -166,13 +166,13 @@ def _get_appliances(self) -> None: # A smartmeter is not present as an appliance, add it specifically if self.smile.type == "power" or self.smile.anna_p1: - self._get_p1_smartmeter_info() + self._add_p1_smartmeter_info() # Sort the gw_entities self._reorder_devices() - def _get_p1_smartmeter_info(self) -> None: - """For P1 collect the connected SmartMeter info from the Home/building location. + def _add_p1_smartmeter_info(self) -> None: + """For P1 collect the smartmeter info from the Home/building location and add it as an entity. Note: For P1, the entity_id for the gateway and smartmeter are switched to maintain backward compatibility. For Anna P1, the smartmeter uses the home location_id directly. From 921605a516db8ab489978103f0b493a18586ccf0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:30:46 +0100 Subject: [PATCH 03/77] Try --- plugwise/helper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 05fd6285a..b4fbef161 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -85,6 +85,8 @@ class SmileHelper(SmileCommon): def __init__(self) -> None: """Set the constructor for this class.""" super().__init__() + self._existing_appliances: list[str] = [] + self._new_appliances: list[str] = [] self._endpoint: str self._elga: bool self._is_thermostat: bool @@ -162,14 +164,23 @@ def _get_appliances(self) -> None: if not (appl := self._appliance_info_finder(appl, appliance)): continue + if appl.entity_id in self._existing_appliances: + continue + else: + self._new_appliances.append(appl.entity_id) + self._create_gw_entities(appl) + if not self._new_appliances: + return False + # A smartmeter is not present as an appliance, add it specifically if self.smile.type == "power" or self.smile.anna_p1: self._add_p1_smartmeter_info() # Sort the gw_entities self._reorder_devices() + return True def _add_p1_smartmeter_info(self) -> None: """For P1 collect the smartmeter info from the Home/building location and add it as an entity. From 48bca0d190a327088488d272fbdfe6cfaec4dfa2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:36:04 +0100 Subject: [PATCH 04/77] Try 2 --- plugwise/helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index b4fbef161..12a313556 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -165,6 +165,7 @@ def _get_appliances(self) -> None: continue if appl.entity_id in self._existing_appliances: + self._new_appliances.append((appl.entity_id)) continue else: self._new_appliances.append(appl.entity_id) @@ -180,6 +181,9 @@ def _get_appliances(self) -> None: # Sort the gw_entities self._reorder_devices() + + self._existing_appliances = self._new_appliances + self._new_appliances = [] return True def _add_p1_smartmeter_info(self) -> None: From b926a38cc006fe1008559a3fa9ec91d18850224b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:37:29 +0100 Subject: [PATCH 05/77] Try 3 --- plugwise/smile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index d6c10f826..a9d677e4b 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -88,6 +88,9 @@ def __init__( self.smile = smile self.therms_with_offset_func: list[str] = [] + self._zones = {} + self.gw_entities = {} + @property def cooling_present(self) -> bool: """Return the cooling capability.""" @@ -121,8 +124,6 @@ async def async_update(self) -> dict[str, GwEntityData]: Any change in the connected entities will be detected immediately. """ - self._zones = {} - self.gw_entities = {} try: await self.full_xml_update() self.get_all_gateway_entities() From 973158d02e6a130b75e5e505109f4864c617bbc6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:42:04 +0100 Subject: [PATCH 06/77] Try 4 --- plugwise/smile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index a9d677e4b..196ef5308 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -109,11 +109,11 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - self._get_appliances() - if self._is_thermostat: - self.therms_with_offset_func = ( - self._get_appliances_with_offset_functionality() - ) + if self._all_appliances(): + if self._is_thermostat: + self.therms_with_offset_func = ( + self._get_appliances_with_offset_functionality() + ) self._scan_thermostats() self._get_groups() From 1df7301b165ce213729177f4720cdb213e7f32b7 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:50:32 +0100 Subject: [PATCH 07/77] Debug --- plugwise/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 12a313556..d50b48a97 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -182,6 +182,7 @@ def _get_appliances(self) -> None: # Sort the gw_entities self._reorder_devices() + LOGGER.debug("HOI new: %s", self._new_appliances) self._existing_appliances = self._new_appliances self._new_appliances = [] return True From 9f29f26489eb0f001b426d977ed55e06add7d072 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:52:53 +0100 Subject: [PATCH 08/77] Try 5 --- plugwise/helper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index d50b48a97..e8509001f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -172,7 +172,7 @@ def _get_appliances(self) -> None: self._create_gw_entities(appl) - if not self._new_appliances: + if self._existing_appliances == self._new_appliances: return False # A smartmeter is not present as an appliance, add it specifically @@ -182,7 +182,6 @@ def _get_appliances(self) -> None: # Sort the gw_entities self._reorder_devices() - LOGGER.debug("HOI new: %s", self._new_appliances) self._existing_appliances = self._new_appliances self._new_appliances = [] return True From 7946a0b36d7b63c1dfca29437902f56a44c036c9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 17:55:40 +0100 Subject: [PATCH 09/77] Try 6 --- plugwise/helper.py | 2 ++ plugwise/smile.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index e8509001f..ba60ece05 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -172,6 +172,8 @@ def _get_appliances(self) -> None: self._create_gw_entities(appl) + LOGGER.debug("HOI existing: %s", self._existing_appliances) + LOGGER.debug("HOI new: %s", self._new_appliances) if self._existing_appliances == self._new_appliances: return False diff --git a/plugwise/smile.py b/plugwise/smile.py index 196ef5308..5659fb2ee 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -109,7 +109,9 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - if self._all_appliances(): + if not self._all_appliances(): + LOGGER.debug("HOI no new appliances found, skipping") + else: if self._is_thermostat: self.therms_with_offset_func = ( self._get_appliances_with_offset_functionality() From 0240992fe21d0d67a7e1473b84f6ab2d2ec6790b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 18:34:46 +0100 Subject: [PATCH 10/77] Try 7 --- plugwise/helper.py | 5 ++++- plugwise/smile.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index ba60ece05..cf724f315 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -174,7 +174,10 @@ def _get_appliances(self) -> None: LOGGER.debug("HOI existing: %s", self._existing_appliances) LOGGER.debug("HOI new: %s", self._new_appliances) - if self._existing_appliances == self._new_appliances: + if self._existing_appliances and not ( + set(self._new_appliances) <= set(self._existing_appliances) + ): + LOGGER.debug("HOI unknown appliance(s) found.") return False # A smartmeter is not present as an appliance, add it specifically diff --git a/plugwise/smile.py b/plugwise/smile.py index 5659fb2ee..abbd060b7 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -16,6 +16,7 @@ DOMAIN_OBJECTS, GATEWAY_REBOOT, LOCATIONS, + LOGGER, MAX_SETPOINT, MIN_SETPOINT, NONE, From 6334dd380c73f575a040e5eba353d0905c4b4ac0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 15 Dec 2025 18:58:58 +0100 Subject: [PATCH 11/77] Update updates/adam_plus_anna_new-xml --- plugwise/helper.py | 8 ++++---- plugwise/smile.py | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index cf724f315..11cebf35c 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -174,10 +174,10 @@ def _get_appliances(self) -> None: LOGGER.debug("HOI existing: %s", self._existing_appliances) LOGGER.debug("HOI new: %s", self._new_appliances) - if self._existing_appliances and not ( - set(self._new_appliances) <= set(self._existing_appliances) - ): - LOGGER.debug("HOI unknown appliance(s) found.") + is_subset = set(self._new_appliances) <= set(self._existing_appliances) + LOGGER.debug("HOI is_subset: %s", is_subset) + if self._existing_appliances and is_subset: + LOGGER.debug("HOI no unknown appliance(s) found.") return False # A smartmeter is not present as an appliance, add it specifically diff --git a/plugwise/smile.py b/plugwise/smile.py index abbd060b7..a7805ef7d 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -110,7 +110,9 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - if not self._all_appliances(): + execute = self._all_appliances() + LOGGER.debug("HOI self._all_appliances() = %s", execute) + if not execute: LOGGER.debug("HOI no new appliances found, skipping") else: if self._is_thermostat: From 40aef8e8db41ea628e4df7c6b3d6f24feb14c13d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 16 Dec 2025 08:38:41 +0100 Subject: [PATCH 12/77] Store module_id for future use --- plugwise/common.py | 5 +++++ plugwise/constants.py | 3 +++ plugwise/helper.py | 2 ++ 3 files changed, 10 insertions(+) diff --git a/plugwise/common.py b/plugwise/common.py index 1024c8218..95291f08f 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -116,6 +116,7 @@ def _appl_heater_central_info( appl.model = ( "Generic heater/cooler" if self._cooling_present else "Generic heater" ) + appl.module_id = module_data["module_id"] return appl @@ -140,6 +141,7 @@ def _appl_thermostat_info( appl.available = module_data["reachable"] appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] + appl.module_id = module_data["module_id"] appl.zigbee_mac = module_data["zigbee_mac_address"] return appl @@ -156,6 +158,7 @@ def _create_gw_entities(self, appl: Munch) -> None: "mac_address": appl.mac, "model": appl.model, "model_id": appl.model_id, + "module_id": appl.module_id, "name": appl.name, "vendor": appl.vendor_name, "zigbee_mac_address": appl.zigbee_mac, @@ -252,6 +255,7 @@ def _get_module_data( "contents": False, "firmware_version": None, "hardware_version": None, + "module_id": None, "reachable": None, "vendor_name": None, "vendor_model": None, @@ -275,6 +279,7 @@ def _get_module_data( module_data["vendor_model"] = module.find("vendor_model").text module_data["hardware_version"] = module.find("hardware_version").text module_data["firmware_version"] = module.find("firmware_version").text + module_data["module_id"] = module.attrib["id"] get_zigbee_data(module, module_data, legacy) break diff --git a/plugwise/constants.py b/plugwise/constants.py index 188a23bfc..6a86e45ab 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -292,6 +292,7 @@ "members", "model", "model_id", + "module_id", "name", "vendor", "zigbee_mac_address", @@ -423,6 +424,7 @@ class ModuleData(TypedDict): contents: bool firmware_version: str | None hardware_version: str | None + module_id: str | None reachable: bool | None vendor_model: str | None vendor_name: str | None @@ -545,6 +547,7 @@ class GwEntityData(TypedDict, total=False): members: list[str] model: str model_id: str | None + module_id: str | None name: str vendor: str zigbee_mac_address: str diff --git a/plugwise/helper.py b/plugwise/helper.py index 11cebf35c..f8d20bf92 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -215,6 +215,7 @@ def _add_p1_smartmeter_info(self) -> None: appl.mac = None appl.model = module_data["vendor_model"] appl.model_id = None # don't use model_id for SmartMeter + appl.module_id = module_data["module_id"] appl.name = "P1" appl.pwclass = "smartmeter" appl.vendor_name = module_data["vendor_name"] @@ -290,6 +291,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree.Element) -> Munch appl.firmware = module_data["firmware_version"] appl.hardware = module_data["hardware_version"] appl.model_id = module_data["vendor_model"] + appl.module_id = module_data["module_id"] appl.vendor_name = module_data["vendor_name"] appl.model = check_model(appl.model_id, appl.vendor_name) appl.zigbee_mac = module_data["zigbee_mac_address"] From 253971cc2e79d8486a4c40219a5b24252969cbf4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 16 Dec 2025 08:44:39 +0100 Subject: [PATCH 13/77] Increase 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 8484d56d7..e47b3db18 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 == 230 + assert self.entity_items == 241 assert test_items == self.entity_items assert self.entity_list == [ "da224107914542988a88561b4452b0f6", From cf8bb3b114afe28bf44a2e2a049d6c0fb1636830 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 16 Dec 2025 08:47:45 +0100 Subject: [PATCH 14/77] Update test-json --- tests/data/adam/adam_plus_anna_new.json | 60 +++++++++++++++++++++---- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index afa38abd8..fd36314d6 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -15,6 +15,7 @@ "upper_bound": 95.0 }, "model": "Generic heater", + "module_id": "c043b48fa65b4292b5579d5550f19dd2", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 22.5, @@ -29,6 +30,7 @@ "dev_class": "valve_actuator_plug", "location": "d9786723dbcf4f19b5c629a54629f9c7", "model_id": "TS0011", + "module_id": "c1f98356f09346b28e26a6ebc0f69275", "name": "Aanvoer water afsluiter (nous lz3)", "switches": { "relay": false @@ -46,6 +48,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Emma Pro", "model_id": "170-01", + "module_id": "85e363f2d0234f13885d41acd77ce6b8", "name": "Emma", "sensors": { "battery": 100, @@ -73,6 +76,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "86937b43514d44e090903d72e53d01b3", "name": "Tom Badkamer", "sensors": { "battery": 60, @@ -97,6 +101,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "fe0bb67baa774960a41ca3148137d646", "name": "Plug MediaTV", "sensors": { "electricity_consumed": 15.8, @@ -118,6 +123,7 @@ "location": "8201a2ac4d1b4303bf994e18d67311eb", "model": "Plug", "model_id": "160-01", + "module_id": "118ccd70e8fa4b1fa746c504a47d95e0", "name": "Plug Thermex Boiler", "sensors": { "electricity_consumed": 0.69, @@ -138,6 +144,7 @@ "location": "b4f211175e124df59603412bafa77a34", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "6fe74ec044bd44d88ac0412df67f188f", "name": "SmartPlug Floor 0", "sensors": { "electricity_consumed_interval": 0.0 @@ -156,6 +163,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "0251fb339b564a378009fcc3049f023c", "name": "Plug Vloerverwarming", "sensors": { "electricity_consumed": 45.0, @@ -174,6 +182,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "f7727a516f974a7e8bf8ae95b4531a7a", "name": "Anna", "sensors": { "setpoint": 20.5, @@ -202,7 +211,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", @@ -210,7 +223,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": { @@ -230,6 +248,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Jip", "model_id": "168-01", + "module_id": "702e95f0db7246bf831bad9fec7a68ff", "name": "Jip", "sensors": { "battery": 100, @@ -251,6 +270,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Lisa", "model_id": "158-01", + "module_id": "a9df3f54db5d4c0c84b6bf6804d41632", "name": "Lisa Badkamer", "sensors": { "battery": 71, @@ -297,7 +317,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": { @@ -320,7 +346,11 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -336,7 +366,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": { @@ -351,10 +387,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" + ] } } From 8c59bc389d43ee1030c51de4c5431f1e43d5dadc Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 16 Dec 2025 08:54:14 +0100 Subject: [PATCH 15/77] Starting... --- plugwise/data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugwise/data.py b/plugwise/data.py index fc45138fb..cca132f47 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -196,6 +196,10 @@ def _get_entity_data(self, entity_id: str, entity: GwEntityData) -> None: entity, "heater_central", "no OpenTherm communication" ) + if "module_id" ind entity: + locator = "module/protocolszig_bee_node" + + # Switching groups data self._entity_switching_group(entity) # Adam data From 00b1aa777923aabae176168b9a61dc7fb1681f43 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 16 Dec 2025 10:54:27 +0100 Subject: [PATCH 16/77] Update zigbee reachable status --- plugwise/data.py | 6 ++---- plugwise/helper.py | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index cca132f47..12f10a510 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -195,10 +195,8 @@ def _get_entity_data(self, entity_id: str, entity: GwEntityData) -> None: self._check_availability( entity, "heater_central", "no OpenTherm communication" ) - - if "module_id" ind entity: - locator = "module/protocolszig_bee_node" - + # Zigbee node availability + self._get_zigbee_availability(data, entity) # Switching groups data self._entity_switching_group(entity) diff --git a/plugwise/helper.py b/plugwise/helper.py index f8d20bf92..bbd3109bb 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -423,6 +423,14 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None: entity.update(data) + def _get_zigbee_availability(self, data: GwEntityData, entity: GwEntityData) -> GwEntityData: + # Check zigbee device availabilty + if "module_id" in entity: + module_id = entity["module_id"] + locator = f'./module[@id="{module_id}"]/protocols/zig_bee_node' + if (module := self._domain_objects.find(locator)) is not None: + data["available"] = module.find("reachable").text == "true" + def _collect_group_sensors( self, data: GwEntityData, From abb427d5cd6e92487381f27076908703ec913ea3 Mon Sep 17 00:00:00 2001 From: autoruff Date: Tue, 16 Dec 2025 09:55:59 +0000 Subject: [PATCH 17/77] fixup: different-update Python code fixed using ruff --- plugwise/helper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index bbd3109bb..3e8e7a2b4 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -423,13 +423,15 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None: entity.update(data) - def _get_zigbee_availability(self, data: GwEntityData, entity: GwEntityData) -> GwEntityData: + def _get_zigbee_availability( + self, data: GwEntityData, entity: GwEntityData + ) -> GwEntityData: # Check zigbee device availabilty if "module_id" in entity: module_id = entity["module_id"] locator = f'./module[@id="{module_id}"]/protocols/zig_bee_node' if (module := self._domain_objects.find(locator)) is not None: - data["available"] = module.find("reachable").text == "true" + data["available"] = module.find("reachable").text == "true" def _collect_group_sensors( self, From 05156e666296c27fcb6ff6e9dc83e13ab1239bfe Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 17 Dec 2025 08:25:39 +0100 Subject: [PATCH 18/77] Detect removed appliances and pop them --- plugwise/helper.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 3e8e7a2b4..5f781b61e 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -167,18 +167,23 @@ def _get_appliances(self) -> None: if appl.entity_id in self._existing_appliances: self._new_appliances.append((appl.entity_id)) continue - else: + else: # add nnew appliance self._new_appliances.append(appl.entity_id) self._create_gw_entities(appl) LOGGER.debug("HOI existing: %s", self._existing_appliances) LOGGER.debug("HOI new: %s", self._new_appliances) - is_subset = set(self._new_appliances) <= set(self._existing_appliances) - LOGGER.debug("HOI is_subset: %s", is_subset) - if self._existing_appliances and is_subset: - LOGGER.debug("HOI no unknown appliance(s) found.") - return False + removed = list(set(self._existing_appliances) - set(self._new_appliances)) + if self._existing_appliances: + if not removed: + LOGGER.debug("HOI no removed appliance(s).") + return False + else: + LOGGER.debug("HOI removed appliance(s): %s", removed) + for appliance in removed: + self.gw_entities.pop(appliance) + return False # A smartmeter is not present as an appliance, add it specifically if self.smile.type == "power" or self.smile.anna_p1: From 740be1fa41883c834abfbe1f8c971912c579b373 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 17 Dec 2025 13:17:08 +0100 Subject: [PATCH 19/77] Remove debug-logging, guard _add_p1_smartmeter_info() --- plugwise/helper.py | 8 ++++---- plugwise/smile.py | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 5f781b61e..beac8f589 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -172,12 +172,10 @@ def _get_appliances(self) -> None: self._create_gw_entities(appl) - LOGGER.debug("HOI existing: %s", self._existing_appliances) - LOGGER.debug("HOI new: %s", self._new_appliances) removed = list(set(self._existing_appliances) - set(self._new_appliances)) if self._existing_appliances: if not removed: - LOGGER.debug("HOI no removed appliance(s).") + LOGGER.debug("HOI no new or removed appliance(s).") return False else: LOGGER.debug("HOI removed appliance(s): %s", removed) @@ -186,7 +184,9 @@ def _get_appliances(self) -> None: return False # A smartmeter is not present as an appliance, add it specifically - if self.smile.type == "power" or self.smile.anna_p1: + if not self._existing_appliances and ( + self.smile.type == "power" or self.smile.anna_p1 + ): self._add_p1_smartmeter_info() # Sort the gw_entities diff --git a/plugwise/smile.py b/plugwise/smile.py index a7805ef7d..bb7b44270 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -110,11 +110,7 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - execute = self._all_appliances() - LOGGER.debug("HOI self._all_appliances() = %s", execute) - if not execute: - LOGGER.debug("HOI no new appliances found, skipping") - else: + if self._all_appliances(): if self._is_thermostat: self.therms_with_offset_func = ( self._get_appliances_with_offset_functionality() From db438844042965b3107208fd1a341c73f673d188 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 17 Dec 2025 13:18:21 +0100 Subject: [PATCH 20/77] Improve/rework _get_groups() --- plugwise/common.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugwise/common.py b/plugwise/common.py index 95291f08f..4bb791374 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -54,7 +54,9 @@ def __init__(self) -> None: self._cooling_present: bool self._count: int self._domain_objects: etree.Element + self._existing_groups: list[str] = [] self._heater_id: str = NONE + self._new_groups: list[st] = [] self._on_off_device: bool self.gw_entities: dict[str, GwEntityData] = {} self.smile: Munch @@ -221,6 +223,14 @@ def _get_groups(self) -> None: } self._count += 5 + removed = list(set(self._existing_groups) - set(self._new_groups)) + if self._existing_groups and removed: + for group in removed: + self.gw_entities.pop(group) + + self._existing_groups = self._new_groups + self._new_groups = [] + def _get_lock_state( self, xml: etree.Element, data: GwEntityData, stretch_v2: bool = False ) -> None: From 04f7ea13fb37582d4e9b837ef5733fd6bd61ab2f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 17 Dec 2025 13:21:16 +0100 Subject: [PATCH 21/77] _all_appliances(), _all_locations() -> _get_appliances(), _get_locations() --- plugwise/helper.py | 2 +- plugwise/smile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index beac8f589..86f533a5d 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -107,7 +107,7 @@ def item_count(self) -> int: """Return the item-count.""" return self._count - def _get_appliances(self) -> None: + def _get_appliances(self) -> bool: """Collect all appliances with relevant info. Also, collect the P1 smartmeter info from a location diff --git a/plugwise/smile.py b/plugwise/smile.py index bb7b44270..c6b28e237 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -110,7 +110,7 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - if self._all_appliances(): + if self._get_appliances(): if self._is_thermostat: self.therms_with_offset_func = ( self._get_appliances_with_offset_functionality() From 052e17eea371ac18963890b5aafabb456f0b4830 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 17 Dec 2025 16:09:40 +0100 Subject: [PATCH 22/77] Optimize --- plugwise/helper.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 86f533a5d..f2ed77c99 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -164,11 +164,9 @@ def _get_appliances(self) -> bool: if not (appl := self._appliance_info_finder(appl, appliance)): continue + self._new_appliances.append(appl.entity_id) if appl.entity_id in self._existing_appliances: - self._new_appliances.append((appl.entity_id)) continue - else: # add nnew appliance - self._new_appliances.append(appl.entity_id) self._create_gw_entities(appl) From 33ec417e4b0abe33ebdef85c8985cc14d4e36e59 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 09:55:10 +0100 Subject: [PATCH 23/77] Fixes --- plugwise/common.py | 2 +- plugwise/smile.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 4bb791374..0df446874 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -56,7 +56,7 @@ def __init__(self) -> None: self._domain_objects: etree.Element self._existing_groups: list[str] = [] self._heater_id: str = NONE - self._new_groups: list[st] = [] + self._new_groups: list[str] = [] self._on_off_device: bool self.gw_entities: dict[str, GwEntityData] = {} self.smile: Munch diff --git a/plugwise/smile.py b/plugwise/smile.py index c6b28e237..21a20d020 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -16,7 +16,6 @@ DOMAIN_OBJECTS, GATEWAY_REBOOT, LOCATIONS, - LOGGER, MAX_SETPOINT, MIN_SETPOINT, NONE, From 4d61588966256232bbe4b0606defad3787a6562e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 10:31:06 +0100 Subject: [PATCH 24/77] Add existing/new detection in _get_locations() and related --- plugwise/helper.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index f2ed77c99..36b03e671 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -86,7 +86,9 @@ def __init__(self) -> None: """Set the constructor for this class.""" super().__init__() self._existing_appliances: list[str] = [] + self._existing_locations: list[str] = [] self._new_appliances: list[str] = [] + self._new_locations: list[str] = [] self._endpoint: str self._elga: bool self._is_thermostat: bool @@ -262,6 +264,15 @@ def _get_locations(self) -> None: "Error, location Home (building) not found!" ) # pragma: no cover + removed = list(set(self._existing_locations) - set(self._new_locations)) + if self._existing_locations and removed: + for location_id in removed: + self._loc_data.pop(location_id) + self._zones.pop(location_id) + + self._existing_locations = self._new_locations + self._new_locations = [] + def _appliance_info_finder(self, appl: Munch, appliance: etree.Element) -> Munch: """Collect info for all appliances found.""" match appl.pwclass: @@ -810,7 +821,8 @@ def _scan_thermostats(self) -> None: return self._match_and_rank_thermostats() - for location_id, location in self._loc_data.items(): + for location_id in self._new_locations: + location = self._loc_data[location_id] if location["primary_prio"] != 0: self._zones[location_id] = { "dev_class": "climate", From ba0e307c2c09400ea391817942d393cec5af7784 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 11:13:42 +0100 Subject: [PATCH 25/77] Add existing/new detection for zones --- plugwise/helper.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 36b03e671..646b97af4 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -87,8 +87,10 @@ def __init__(self) -> None: super().__init__() self._existing_appliances: list[str] = [] self._existing_locations: list[str] = [] + self._existing_zones: list[str] = [] self._new_appliances: list[str] = [] self._new_locations: list[str] = [] + self._new_zones: list[str] = [] self._endpoint: str self._elga: bool self._is_thermostat: bool @@ -821,9 +823,14 @@ def _scan_thermostats(self) -> None: return self._match_and_rank_thermostats() - for location_id in self._new_locations: - location = self._loc_data[location_id] + # for location_id in self._new_locations: + # location = self._loc_data[location_id] + for location_id, location in self._loc_data.items(): if location["primary_prio"] != 0: + self._new_zones.append(location_id) + if location_id in self._existing_zones: + continue + self._zones[location_id] = { "dev_class": "climate", "model": "ThermoZone", @@ -836,7 +843,15 @@ def _scan_thermostats(self) -> None: } self._count += 5 - def _match_and_rank_thermostats(self) -> None: + removed = list(set(self._existing_zones) - set(self._new_zones)) + if self._existing_zones and removed: + for location_id in removed: + self._zones.pop(location_id) + + self._existing_zones = self._new_zones + self._new_zones = [] + + def _match_and_rank_thermostats(self) -> dict[str, ThermoLoc]: """Helper-function for _scan_thermostats(). Match thermostat-appliances with locations, rank them for locations with multiple thermostats. From 0e8047980dabafefd3f885656507c67c36c246a1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 13:53:51 +0100 Subject: [PATCH 26/77] Optimize, clean up --- plugwise/helper.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 646b97af4..0bab7af08 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -823,8 +823,6 @@ def _scan_thermostats(self) -> None: return self._match_and_rank_thermostats() - # for location_id in self._new_locations: - # location = self._loc_data[location_id] for location_id, location in self._loc_data.items(): if location["primary_prio"] != 0: self._new_zones.append(location_id) From a11de306ded871a592848ba804ad1b585d0597b6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 13:54:56 +0100 Subject: [PATCH 27/77] Make sure to update all (thermo)zones as there can be changes in a zone too --- plugwise/helper.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 0bab7af08..a4fc82e94 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -826,9 +826,6 @@ def _scan_thermostats(self) -> None: for location_id, location in self._loc_data.items(): if location["primary_prio"] != 0: self._new_zones.append(location_id) - if location_id in self._existing_zones: - continue - self._zones[location_id] = { "dev_class": "climate", "model": "ThermoZone", From 4e84df98fc37479823326adee99feaf985169ffa Mon Sep 17 00:00:00 2001 From: autoruff Date: Thu, 18 Dec 2025 13:14:36 +0000 Subject: [PATCH 28/77] fixup: different-update Python code fixed using ruff --- plugwise/smile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index 21a20d020..2977bca5f 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -114,7 +114,6 @@ def get_all_gateway_entities(self) -> None: self.therms_with_offset_func = ( self._get_appliances_with_offset_functionality() ) - self._scan_thermostats() self._get_groups() self._all_entity_data() From 912cc4161e9e0340f4e9a7de00c20caf2a344e70 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 14:55:48 +0100 Subject: [PATCH 29/77] Fix typo, clean up debugging --- plugwise/common.py | 3 +++ plugwise/helper.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 0df446874..a7bdd1598 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -205,6 +205,9 @@ def _get_groups(self) -> None: for group in self._domain_objects.findall("./group"): members: list[str] = [] group_id = group.get("id") + self._new_groups.append(group_id) + if group_id in self._existing_groups: + continue group_name = group.find("name").text group_type = group.find("type").text group_appliances = group.findall("appliances/appliance") diff --git a/plugwise/helper.py b/plugwise/helper.py index a4fc82e94..46f99d76c 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -177,10 +177,8 @@ def _get_appliances(self) -> bool: removed = list(set(self._existing_appliances) - set(self._new_appliances)) if self._existing_appliances: if not removed: - LOGGER.debug("HOI no new or removed appliance(s).") return False else: - LOGGER.debug("HOI removed appliance(s): %s", removed) for appliance in removed: self.gw_entities.pop(appliance) return False From 84af2b299fb117c17e199c0172b1b3640ad288f2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 14:57:44 +0100 Subject: [PATCH 30/77] More fixes --- plugwise/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 46f99d76c..8b2f769e0 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -439,8 +439,8 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None: def _get_zigbee_availability( self, data: GwEntityData, entity: GwEntityData - ) -> GwEntityData: - # Check zigbee device availabilty + ) -> None: + # Check zigbee device availability if "module_id" in entity: module_id = entity["module_id"] locator = f'./module[@id="{module_id}"]/protocols/zig_bee_node' From b10bb85907fcf375aacde34bdb29a96ee16c85ff Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:31:34 +0100 Subject: [PATCH 31/77] Fix SonarCloud reports --- plugwise/common.py | 13 ++++++++----- plugwise/smile.py | 9 ++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index a7bdd1598..48815b773 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -212,9 +212,7 @@ def _get_groups(self) -> None: group_type = group.find("type").text group_appliances = group.findall("appliances/appliance") for item in group_appliances: - # Check if members are not orphaned - stretch - if item.get("id") in self.gw_entities: - members.append(item.get("id")) + self._add_member(item) if group_type in GROUP_TYPES and members and group_id: self.gw_entities[group_id] = { @@ -228,12 +226,17 @@ def _get_groups(self) -> None: removed = list(set(self._existing_groups) - set(self._new_groups)) if self._existing_groups and removed: - for group in removed: - self.gw_entities.pop(group) + for group_id in removed: + self.gw_entities.pop(group_id) self._existing_groups = self._new_groups self._new_groups = [] + def _add_member(element: etree.Element, members: list[str]) -> None: + """Check and add member to list.""" + if element.attrib["id"] in self.gw_entities: + members.append(item.attrib["id"]) + def _get_lock_state( self, xml: etree.Element, data: GwEntityData, stretch_v2: bool = False ) -> None: diff --git a/plugwise/smile.py b/plugwise/smile.py index 2977bca5f..9704643f5 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -109,11 +109,10 @@ def get_all_gateway_entities(self) -> None: Collect and add switching- and/or pump-group entities. Finally, collect the data and states for each entity. """ - if self._get_appliances(): - if self._is_thermostat: - self.therms_with_offset_func = ( - self._get_appliances_with_offset_functionality() - ) + if self._get_appliances() and self._is_thermostat: + self.therms_with_offset_func = ( + self._get_appliances_with_offset_functionality() + ) self._get_groups() self._all_entity_data() From b77a4c24bd9648552ca25d135fe199c441c1fea8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:34:29 +0100 Subject: [PATCH 32/77] Fix double zone-pop --- plugwise/helper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 8b2f769e0..07e73be34 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -268,7 +268,6 @@ def _get_locations(self) -> None: if self._existing_locations and removed: for location_id in removed: self._loc_data.pop(location_id) - self._zones.pop(location_id) self._existing_locations = self._new_locations self._new_locations = [] From a0fdefab5b1fe42ab95658b77659cc71a15442da Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:35:53 +0100 Subject: [PATCH 33/77] Add missing self --- plugwise/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/common.py b/plugwise/common.py index 48815b773..46f3cd6a7 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -232,7 +232,7 @@ def _get_groups(self) -> None: self._existing_groups = self._new_groups self._new_groups = [] - def _add_member(element: etree.Element, members: list[str]) -> None: + def _add_member(self, element: etree.Element, members: list[str]) -> None: """Check and add member to list.""" if element.attrib["id"] in self.gw_entities: members.append(item.attrib["id"]) From 3a7fa1418d7d8136d9330c778bc68aebfda711e4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:42:52 +0100 Subject: [PATCH 34/77] Make sure to detect location-name change --- plugwise/helper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 07e73be34..c9f6da4eb 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -245,6 +245,13 @@ def _get_locations(self) -> None: loc.loc_id = location.get("id") loc.name = location.find("name").text loc._type = location.find("type").text + self._new_locations.append(loc.loc_id) + if ( + loc.loc_id in self._existing_locations + and self._loc_data[loc.loc_id]["name"] == loc.name + ): + continue + self._loc_data[loc.loc_id] = { "name": loc.name, "primary": [], From e6951c07b7adac0efc0fb40ebde529cdba785838 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:49:51 +0100 Subject: [PATCH 35/77] Change the THERMO_MATCHING constant --- plugwise/helper.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index c9f6da4eb..eb5bab6e9 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -176,12 +176,9 @@ def _get_appliances(self) -> bool: removed = list(set(self._existing_appliances) - set(self._new_appliances)) if self._existing_appliances: - if not removed: - return False - else: - for appliance in removed: - self.gw_entities.pop(appliance) - return False + for appliance in removed: + self.gw_entities.pop(appliance) + return False # A smartmeter is not present as an appliance, add it specifically if not self._existing_appliances and ( From 0c0ecd766e27c5575ef4a69106e804c66261a246 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 15:52:26 +0100 Subject: [PATCH 36/77] Improve _add_member() --- plugwise/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 46f3cd6a7..80027d560 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -212,7 +212,7 @@ def _get_groups(self) -> None: group_type = group.find("type").text group_appliances = group.findall("appliances/appliance") for item in group_appliances: - self._add_member(item) + self._add_member(item, members) if group_type in GROUP_TYPES and members and group_id: self.gw_entities[group_id] = { @@ -234,8 +234,8 @@ def _get_groups(self) -> None: def _add_member(self, element: etree.Element, members: list[str]) -> None: """Check and add member to list.""" - if element.attrib["id"] in self.gw_entities: - members.append(item.attrib["id"]) + if (member_id := element.attrib["id"]) in self.gw_entities: + members.append(member_id) def _get_lock_state( self, xml: etree.Element, data: GwEntityData, stretch_v2: bool = False From 2bc1551783760334838064f77e2f2048060251f9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 16:16:54 +0100 Subject: [PATCH 37/77] Detect smartmeter change --- plugwise/helper.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index eb5bab6e9..2f4ea9f65 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -174,21 +174,19 @@ def _get_appliances(self) -> bool: self._create_gw_entities(appl) - removed = list(set(self._existing_appliances) - set(self._new_appliances)) - if self._existing_appliances: - for appliance in removed: - self.gw_entities.pop(appliance) - return False - # A smartmeter is not present as an appliance, add it specifically - if not self._existing_appliances and ( - self.smile.type == "power" or self.smile.anna_p1 - ): + if self.smile.type == "power" or self.smile.anna_p1: self._add_p1_smartmeter_info() # Sort the gw_entities self._reorder_devices() + removed = list(set(self._existing_appliances) - set(self._new_appliances)) + if self._existing_appliances: + for appliance in removed: + self.gw_entities.pop(appliance) + return False + self._existing_appliances = self._new_appliances self._new_appliances = [] return True @@ -207,6 +205,13 @@ def _add_p1_smartmeter_info(self) -> None: if not module_data["contents"]: # pragma: no cover return + module_id = module_data["module_id"] + if ( + self.gw_entities[self._home_loc_id]["module_id"] == module_id + or self.gw_entities[self._gateway_id]["module_id"] == module_id + ): + return + appl.available = None appl.entity_id = self._home_loc_id if not self.smile.anna_p1: @@ -217,7 +222,7 @@ def _add_p1_smartmeter_info(self) -> None: appl.mac = None appl.model = module_data["vendor_model"] appl.model_id = None # don't use model_id for SmartMeter - appl.module_id = module_data["module_id"] + appl.module_id = module_id appl.name = "P1" appl.pwclass = "smartmeter" appl.vendor_name = module_data["vendor_name"] From ecc68ea1af1170c7ef64e4d5bf07c1dc68cc2150 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 16:21:48 +0100 Subject: [PATCH 38/77] Use in-construct as suggested --- plugwise/helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 2f4ea9f65..25f2eee62 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -206,9 +206,9 @@ def _add_p1_smartmeter_info(self) -> None: return module_id = module_data["module_id"] - if ( - self.gw_entities[self._home_loc_id]["module_id"] == module_id - or self.gw_entities[self._gateway_id]["module_id"] == module_id + if module_id in ( + self.gw_entities[self._home_loc_id]["module_id"], + self.gw_entities[self._gateway_id]["module_id"], ): return From 68d517663e69486df344ac1bc79956b2bc3ec25b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 16:31:14 +0100 Subject: [PATCH 39/77] Use .get() constructs as suggested --- plugwise/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 25f2eee62..519be067b 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -207,8 +207,8 @@ def _add_p1_smartmeter_info(self) -> None: module_id = module_data["module_id"] if module_id in ( - self.gw_entities[self._home_loc_id]["module_id"], - self.gw_entities[self._gateway_id]["module_id"], + self.gw_entities[self._gateway_id].get("module_id"), + self.gw_entities.get(self._home_loc_id, {}).get("module_id"), ): return From f3273f51b26b98b70b4f7ee1582b902be7bb2f87 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 17:16:41 +0100 Subject: [PATCH 40/77] Update test entity_items asserts and test-jsons --- tests/data/adam/adam_heatpump_cooling.json | 207 +++++++++++++++--- tests/data/adam/adam_jip.json | 111 ++++++++-- .../adam/adam_multiple_devices_per_zone.json | 84 ++++++- .../adam_onoff_cooling_fake_firmware.json | 25 ++- tests/data/adam/adam_plus_anna.json | 21 +- tests/data/adam/adam_zone_per_device.json | 92 ++++++-- tests/data/anna/anna_v4.json | 16 +- tests/test_adam.py | 12 +- tests/test_anna.py | 34 +-- 9 files changed, 495 insertions(+), 107 deletions(-) diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index 71bfad7e2..60d15563c 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.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, @@ -58,6 +70,7 @@ }, "model": "Generic heater/cooler", "model_id": "17.1", + "module_id": "1ad05e10747b4e40ba2ba82f2872d1c1", "name": "OpenTherm", "sensors": { "dhw_temperature": 63.5, @@ -84,6 +97,7 @@ "location": "b52908550469425b812c87f766fe5303", "model": "Lisa", "model_id": "158-01", + "module_id": "1f0d0e98291145afa4da4432f76a7bd2", "name": "Thermostaat BK", "sensors": { "battery": 55, @@ -106,6 +120,7 @@ "location": "20e735858f8146cead98b873177a4f99", "model": "Plug", "model_id": "160-01", + "module_id": "0a00ddca4e9543c69c6648e5488590dd", "name": "Smart Plug DB", "sensors": { "electricity_consumed": 0.0, @@ -132,7 +147,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 +168,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, @@ -160,6 +187,7 @@ "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "model": "Plug", "model_id": "160-01", + "module_id": "3fa224c4c39f458583b2dab4515210bf", "name": "Smart Plug KK", "sensors": { "electricity_consumed": 2.13, @@ -180,6 +208,7 @@ "location": "04b15f6e884448288f811d29fb7b1b30", "model": "Plug", "model_id": "160-01", + "module_id": "483836101eb141e2b04045eedc3716ff", "name": "Smart Plug SJ", "sensors": { "electricity_consumed": 0.0, @@ -200,6 +229,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "Plug", "model_id": "160-01", + "module_id": "e20da25d0cbf456097aa1a954efed11b", "name": "Smart Plug WK", "sensors": { "electricity_consumed": 0.0, @@ -221,6 +251,7 @@ "location": "20e735858f8146cead98b873177a4f99", "model": "Lisa", "model_id": "158-01", + "module_id": "ddd4ed4873864199b6121459ae9fa4ae", "name": "Thermostaat DB", "sensors": { "setpoint": 18.0, @@ -248,7 +279,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 +299,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, @@ -275,6 +318,7 @@ "location": "9a27714b970547ee9a6bdadc2b815ad5", "model": "Plug", "model_id": "160-01", + "module_id": "2028add51f214a3dbddfa1706e63cfed", "name": "Smart Plug SQ", "sensors": { "electricity_consumed": 0.0, @@ -294,7 +338,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", @@ -325,6 +373,7 @@ "location": "e39529c79ab54fda9bed26cfc0447546", "model": "Lisa", "model_id": "158-01", + "module_id": "d2f732f328ba447abd5be12f2e196205", "name": "Thermostaat JM", "sensors": { "setpoint": 18.0, @@ -346,6 +395,7 @@ "location": "b52908550469425b812c87f766fe5303", "model": "Plug", "model_id": "160-01", + "module_id": "44fe408e4afd47c19928941ef5499298", "name": "Smart Plug BK", "sensors": { "electricity_consumed": 0.0, @@ -366,6 +416,7 @@ "location": "5cc21042f87f4b4c94ccb5537c47a53f", "model": "Plug", "model_id": "160-01", + "module_id": "1695cccaacc94580860544338b272ce0", "name": "Smart Plug BK2", "sensors": { "electricity_consumed": 0.0, @@ -392,7 +443,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 +464,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 +489,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 +509,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, @@ -453,6 +528,7 @@ "location": "e39529c79ab54fda9bed26cfc0447546", "model": "Plug", "model_id": "160-01", + "module_id": "9a3848f23b814b708f7f5bf15702c60d", "name": "Smart Plug JM", "sensors": { "electricity_consumed": 0.0, @@ -479,7 +555,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 +576,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, @@ -507,6 +595,7 @@ "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "model": "Plug", "model_id": "160-01", + "module_id": "3e205ba6cede43e5b461e7c76340a64d", "name": "Smart Plug RB", "sensors": { "electricity_consumed": 3.13, @@ -533,7 +622,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 +643,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 +668,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 +689,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, @@ -595,6 +708,7 @@ "location": "8cf650a4c10c44819e426bed406aec34", "model": "Plug", "model_id": "160-01", + "module_id": "7435452fbc684a30a4978913f342c68b", "name": "Smart Plug BK1", "sensors": { "electricity_consumed": 0.0, @@ -616,6 +730,7 @@ "location": "9a27714b970547ee9a6bdadc2b815ad5", "model": "Lisa", "model_id": "158-01", + "module_id": "6991158ce7774dca864ec8fcf7a039ab", "name": "Thermostaat SQ", "sensors": { "setpoint": 18.5, @@ -638,6 +753,7 @@ "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "model": "Lisa", "model_id": "158-01", + "module_id": "11e4f552602c4b03980e0955e0f114f0", "name": "Thermostaat RB", "sensors": { "setpoint": 17.0, @@ -657,6 +773,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "e2d52aece0524fde9c346953e5e1acb2", "name": "Thermostaat WK", "sensors": { "setpoint": 21.5, @@ -672,6 +789,7 @@ "location": "04b15f6e884448288f811d29fb7b1b30", "model": "Lisa", "model_id": "158-01", + "module_id": "21d57d51898b41c69ad87fffb59f2581", "name": "Thermostaat SJ", "sensors": { "setpoint": 20.5, @@ -699,7 +817,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 +838,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, @@ -731,6 +861,7 @@ "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "model": "Lisa", "model_id": "158-01", + "module_id": "0f19738aed2e4bc09e0ca832f2e0c5a4", "name": "Thermostaat KK", "sensors": { "battery": 53, @@ -754,6 +885,7 @@ "location": "8cf650a4c10c44819e426bed406aec34", "model": "Lisa", "model_id": "158-01", + "module_id": "efe84c28928a4ce08603024b5edc2fc7", "name": "Thermostaat BK1", "sensors": { "setpoint": 20.5, @@ -776,6 +908,7 @@ "location": "5cc21042f87f4b4c94ccb5537c47a53f", "model": "Lisa", "model_id": "158-01", + "module_id": "867bdfa029f042e2a50ab9974cff6fac", "name": "Thermostaat BK2", "sensors": { "setpoint": 20.5, @@ -803,7 +936,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 +957,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/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index da7df0e27..3c44c416b 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -7,7 +7,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -20,11 +26,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], - "secondary": ["356b65335e274d769c338223e7af9c33"] + "primary": [ + "1346fbd8498d4dbcab7e18d51b771f3d" + ], + "secondary": [ + "356b65335e274d769c338223e7af9c33" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -34,7 +48,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": null, "select_zone_profile": "active", "sensors": { @@ -47,11 +67,19 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], - "secondary": ["833de10f269c4deab58fb9df69901b4e"] + "primary": [ + "f61f1a2535f54f52ad006a3d18e459ca" + ], + "secondary": [ + "833de10f269c4deab58fb9df69901b4e" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -64,6 +92,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Lisa", "model_id": "158-01", + "module_id": "9a08c0d05ffd4f02be9a9bdeb3d01175", "name": "Slaapkamer", "sensors": { "battery": 92, @@ -87,6 +116,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "e71d43382a894c9e888d379368aafba9", "name": "Tom Logeerkamer", "sensors": { "setpoint": 13.0, @@ -111,6 +141,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "ccc140dafdc5416dab052bffc465a770", "name": "Tom Slaapkamer", "sensors": { "setpoint": 13.0, @@ -133,6 +164,7 @@ "location": "9e4433a9d69f40b3aefd15e74395eaec", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "2ddb4057a8fd46aba92e23c770f3297d", "name": "Plug", "sensors": { "electricity_consumed_interval": 0.0 @@ -155,6 +187,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Lisa", "model_id": "158-01", + "module_id": "3f91eab3749349799b17f04873bde07e", "name": "Kinderkamer", "sensors": { "battery": 79, @@ -178,6 +211,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "fc657e19ee7442ab8bfe66df62cb40b3", "name": "Tom Woonkamer", "sensors": { "setpoint": 9.0, @@ -205,6 +239,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Lisa", "model_id": "158-01", + "module_id": "1814d63fb9824aa8aae4d4329d84dfa3", "name": "Logeerkamer", "sensors": { "battery": 80, @@ -226,7 +261,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", @@ -234,7 +273,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": { @@ -251,7 +295,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -264,11 +314,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], - "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] + "primary": [ + "6f3e9d7084214c21b9dfa46f6eeb8700" + ], + "secondary": [ + "d4496250d0e942cfa7aea3476e9070d5" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -278,6 +336,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "5785d8678bed443ea72b52a1c8a7108d", "name": "Tom Kinderkamer", "sensors": { "setpoint": 13.0, @@ -302,7 +361,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -315,11 +380,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["a6abc6a129ee499c88a4d420cc413b47"], - "secondary": ["1da4d325838e4ad8aac12177214505c9"] + "primary": [ + "a6abc6a129ee499c88a4d420cc413b47" + ], + "secondary": [ + "1da4d325838e4ad8aac12177214505c9" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "e4684553153b44afbef2200885f379dc": { "available": true, @@ -344,6 +417,7 @@ }, "model": "Generic heater", "model_id": "10.20", + "module_id": "2bd6e83f0ae340058606c33503202c72", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -368,6 +442,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Jip", "model_id": "168-01", + "module_id": "73a5e7c19d3744ad96dfad74142d2db4", "name": "Woonkamer", "sensors": { "battery": 100, diff --git a/tests/data/adam/adam_multiple_devices_per_zone.json b/tests/data/adam/adam_multiple_devices_per_zone.json index 364d71e59..0d258d362 100644 --- a/tests/data/adam/adam_multiple_devices_per_zone.json +++ b/tests/data/adam/adam_multiple_devices_per_zone.json @@ -6,6 +6,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "4e1da90f22384bc691fe0282e02d272f", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -35,7 +36,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 +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, @@ -84,8 +97,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -96,6 +113,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a03128e5e9334b088c724fd96947c765", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 84.1, @@ -125,7 +143,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 +161,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -149,6 +175,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "822e635587994817a76599ea1190f9ee", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -170,6 +197,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a5a8713dd3f94f2a9d63db8a521af6b2", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -195,6 +223,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "b622e3c6a32544f8a4d83e3385592e36", "name": "Thermostatic Radiator Badkamer 1", "sensors": { "battery": 51, @@ -223,6 +252,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Lisa", "model_id": "158-01", + "module_id": "f887b0af3d1e45c794057ee606b21db8", "name": "Zone Thermostat Jessie", "sensors": { "battery": 37, @@ -245,6 +275,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", "model_id": "160-01", + "module_id": "800d5287643c4fd89dfcfbf336d4f7ec", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.6, @@ -273,7 +304,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 +322,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -311,6 +352,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "5ccda7375b0f467e88499a636450dc91", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -336,6 +378,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "39e077a2eb224dcea3415471de00823c", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -361,6 +404,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "02d1299fdbab4f7b93765e0af1c250d8", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -388,6 +432,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Lisa", "model_id": "158-01", + "module_id": "dd68d0641eb04571be62b9940aae363a", "name": "Zone Lisa WK", "sensors": { "battery": 34, @@ -418,7 +463,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 +483,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, @@ -444,6 +499,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -469,6 +525,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "468bbe14853f4fb18a8860333cecc42a", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -497,6 +554,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Lisa", "model_id": "158-01", + "module_id": "e5f81fd832d844e5bd46219831468a62", "name": "Zone Lisa Bios", "sensors": { "battery": 67, @@ -537,6 +595,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "d00e1ba75ed14b2388971b32abc94cde", "name": "CV Kraan Garage", "sensors": { "battery": 68, @@ -582,6 +641,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Lisa", "model_id": "158-01", + "module_id": "ebd9f53ab3894bee91e36350c1fbb6c7", "name": "Thermostatic Radiator Badkamer 2", "sensors": { "battery": 92, diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index f822e33d8..77a452707 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.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", @@ -70,6 +74,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "e2d52aece0524fde9c346953e5e1acb2", "name": "Thermostaat WK", "sensors": { "setpoint": 21.5, @@ -90,7 +95,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 +116,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/tests/data/adam/adam_plus_anna.json b/tests/data/adam/adam_plus_anna.json index 8533e7468..00d4014dd 100644 --- a/tests/data/adam/adam_plus_anna.json +++ b/tests/data/adam/adam_plus_anna.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" @@ -42,6 +53,7 @@ "upper_bound": 100.0 }, "model": "Generic heater", + "module_id": "94c63e8b46284f6ab2f40d19619afcba", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -58,6 +70,7 @@ "location": "45d410adf8fd461e85cebf16d5ead542", "model": "Plug", "model_id": "160-01", + "module_id": "0fd8411d0bc446a08c336a7bba029e22", "name": "MediaCenter", "sensors": { "electricity_consumed": 10.3, @@ -100,6 +113,7 @@ "location": "009490cc2f674ce6b576863fbb64f867", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "bb2fc3da88144d018ee51861e13f505d", "name": "Anna", "sensors": { "setpoint": 20.5, @@ -112,6 +126,7 @@ "dev_class": "computer_desktop_plug", "firmware": "2019-06-21T02:00:00+02:00", "location": "5ccb6c41a7d9403988d261ceee04239f", + "module_id": "72b2aa43d2ea4a33b23ade5e6629de8d", "name": "Work-PC", "sensors": { "electricity_consumed": 80.5, diff --git a/tests/data/adam/adam_zone_per_device.json b/tests/data/adam/adam_zone_per_device.json index c40afc0ba..857dd7677 100644 --- a/tests/data/adam/adam_zone_per_device.json +++ b/tests/data/adam/adam_zone_per_device.json @@ -6,6 +6,7 @@ "location": "c4d2bda6df8146caa2e5c2b5dc65660e", "model": "Plug", "model_id": "160-01", + "module_id": "4e1da90f22384bc691fe0282e02d272f", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -35,7 +36,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 +54,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["f1fee6043d3642a9b0a65297455f008e"], - "secondary": ["680423ff840043738f42cc7f1ff97a36"] + "primary": [ + "f1fee6043d3642a9b0a65297455f008e" + ], + "secondary": [ + "680423ff840043738f42cc7f1ff97a36" + ] }, "vendor": "Plugwise" }, @@ -67,7 +78,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 +98,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -93,6 +114,7 @@ "location": "4efbab4c8bb84fbab26c8decf670eb96", "model": "Plug", "model_id": "160-01", + "module_id": "a03128e5e9334b088c724fd96947c765", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 80.1, @@ -122,7 +144,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 +162,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -146,6 +176,7 @@ "location": "0217e9743c174eef9d6e9f680d403ce2", "model": "Plug", "model_id": "160-01", + "module_id": "822e635587994817a76599ea1190f9ee", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -167,6 +198,7 @@ "location": "2b1591ecf6344d4d93b03dece9747648", "model": "Plug", "model_id": "160-01", + "module_id": "a5a8713dd3f94f2a9d63db8a521af6b2", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -192,6 +224,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "b622e3c6a32544f8a4d83e3385592e36", "name": "Thermostatic Radiator Badkamer", "sensors": { "battery": 51, @@ -220,6 +253,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Lisa", "model_id": "158-01", + "module_id": "f887b0af3d1e45c794057ee606b21db8", "name": "Zone Thermostat Jessie", "sensors": { "battery": 37, @@ -242,6 +276,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", "model_id": "160-01", + "module_id": "800d5287643c4fd89dfcfbf336d4f7ec", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.8, @@ -270,7 +305,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 +323,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -308,6 +353,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "5ccda7375b0f467e88499a636450dc91", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -333,6 +379,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "39e077a2eb224dcea3415471de00823c", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -358,6 +405,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "02d1299fdbab4f7b93765e0af1c250d8", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -385,6 +433,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Lisa", "model_id": "158-01", + "module_id": "dd68d0641eb04571be62b9940aae363a", "name": "Zone Lisa WK", "sensors": { "battery": 34, @@ -415,7 +464,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 +484,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, @@ -441,6 +500,7 @@ "location": "e704bae65654496f9cade9c855decdfe", "model": "Plug", "model_id": "160-01", + "module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -466,6 +526,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "468bbe14853f4fb18a8860333cecc42a", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -494,6 +555,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Lisa", "model_id": "158-01", + "module_id": "e5f81fd832d844e5bd46219831468a62", "name": "Zone Lisa Bios", "sensors": { "battery": 67, @@ -534,6 +596,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "d00e1ba75ed14b2388971b32abc94cde", "name": "CV Kraan Garage", "sensors": { "battery": 68, @@ -562,6 +625,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Lisa", "model_id": "158-01", + "module_id": "ebd9f53ab3894bee91e36350c1fbb6c7", "name": "Zone Thermostat Badkamer", "sensors": { "battery": 92, diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 7e6f138be..563bd837e 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.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", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", + "module_id": "807a45cbc950419c98ce4624bc27ff09", "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, @@ -72,6 +83,7 @@ }, "model": "Generic heater", "model_id": "2.32", + "module_id": "88c1299c194f4b39b857e369803c2481", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, diff --git a/tests/test_adam.py b/tests/test_adam.py index e47b3db18..c860accc5 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -228,7 +228,7 @@ async def test_connect_adam_zone_per_device(self): test_items = await self.device_test(api, "2022-05-16 00:00:01", testdata) assert api.gateway_id == "fe799307f1624099878210aa0b9f1475" - assert self.entity_items == 386 + assert self.entity_items == 402 assert test_items == self.entity_items assert "af82e4ccf9c548528166d38e560662a4" in self.notifications @@ -302,7 +302,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): ) test_items = await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 394 + assert self.entity_items == 410 assert test_items == self.entity_items assert "af82e4ccf9c548528166d38e560662a4" in self.notifications @@ -339,7 +339,7 @@ async def test_adam_heatpump_cooling(self): 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 == 539 + assert self.entity_items == 560 assert test_items == self.entity_items assert self.cooling_present assert self._cooling_enabled @@ -363,7 +363,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 == 70 + assert self.entity_items == 71 assert test_items == self.entity_items assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -388,7 +388,7 @@ async def test_connect_adam_plus_anna(self): test_items = await self.device_test(api, "2020-03-22 00:00:01", testdata) assert api.gateway_id == "b128b4bbbd1f47e9bf4d756e8fb5ee94" - assert self.entity_items == 82 + assert self.entity_items == 86 assert test_items == self.entity_items assert "6fb89e35caeb4b1cb275184895202d84" in self.notifications @@ -429,7 +429,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 == 269 + assert self.entity_items == 279 assert test_items == self.entity_items # Negative test diff --git a/tests/test_anna.py b/tests/test_anna.py index 84fbcf27a..26f72bfcc 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -29,7 +29,7 @@ async def test_connect_anna_v4(self): await self.device_test(api, "2020-04-05 00:00:01", testdata) assert api.gateway_id == "0466eae8520144c78afb29628384edeb" - assert self.entity_items == 60 + assert self.entity_items == 62 assert not self.notifications assert not self.cooling_present @@ -101,7 +101,7 @@ async def test_connect_anna_v4_dhw(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 60 + assert self.entity_items == 62 assert not self.notifications result = await self.tinker_thermostat( @@ -130,7 +130,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(api, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 60 + assert self.entity_items == 62 result = await self.tinker_thermostat( api, @@ -158,7 +158,7 @@ async def test_connect_anna_without_boiler_fw441(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 41 + assert self.entity_items == 43 assert not self.notifications result = await self.tinker_thermostat( @@ -186,7 +186,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 69 + assert self.entity_items == 71 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -216,7 +216,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 66 + assert self.entity_items == 68 await api.close_connection() await self.disconnect(server, client) @@ -241,7 +241,7 @@ async def test_connect_anna_heatpump_cooling(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 66 + assert self.entity_items == 68 assert self.cooling_present assert not self.notifications @@ -287,7 +287,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(api, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 66 + assert self.entity_items == 68 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -313,7 +313,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(api, "2020-04-12 00:00:01", testdata) assert api.gateway_id == "015ae9ea3f964e668e490fa39da3870b" - assert self.entity_items == 65 + assert self.entity_items == 67 assert not self.notifications assert not self.cooling_present @@ -336,7 +336,7 @@ async def test_connect_anna_elga_2(self): ) await self.device_test(api, "2022-03-13 00:00:01", testdata) - assert self.entity_items == 61 + assert self.entity_items == 63 assert api.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -356,7 +356,7 @@ async def test_connect_anna_elga_2_schedule_off(self): await self.device_test(api, "2022-03-13 00:00:01", testdata) assert not self._cooling_enabled - assert self.entity_items == 65 + assert self.entity_items == 67 result = await self.tinker_thermostat( api, @@ -387,7 +387,7 @@ async def test_connect_anna_elga_2_cooling(self): ) await self.device_test(api, "2022-03-10 00:00:01", testdata) - assert self.entity_items == 65 + assert self.entity_items == 67 assert not self.notifications assert self.cooling_present @@ -440,7 +440,7 @@ async def test_connect_anna_loria_heating_idle(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 68 + assert self.entity_items == 70 assert self.cooling_present assert not self._cooling_enabled @@ -505,7 +505,7 @@ async def test_connect_anna_loria_cooling_active(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 68 + assert self.entity_items == 70 assert self.cooling_present assert self._cooling_enabled @@ -528,7 +528,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 68 + assert self.entity_items == 70 assert self.cooling_present assert not self._cooling_enabled @@ -551,7 +551,7 @@ async def test_connect_anna_p1(self): ) await self.device_test(api, "2025-11-02 00:00:01", testdata) - assert self.entity_items == 76 + assert self.entity_items == 78 await api.close_connection() await self.disconnect(server, client) @@ -572,7 +572,7 @@ async def test_connect_anna_v4_no_modules(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 12 + assert self.entity_items == 14 await api.close_connection() await self.disconnect(server, client) From 86feb0eed46ae2cf18a228c4956000ba99b0133a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 18:05:43 +0100 Subject: [PATCH 41/77] Debug --- plugwise/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 519be067b..270af3612 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -699,6 +699,7 @@ def _get_gateway_outdoor_temp(self, entity_id: str, data: GwEntityData) -> None: locator = "./logs/point_log[type='outdoor_temperature']/period/measurement" if (found := self._home_location.find(locator)) is not None: value = format_measure(found.text, NONE) + LOGGER.debug("HOI outdoor_temp = %s", value) data.update({"sensors": {"outdoor_temperature": value}}) self._count += 1 From 355ed081c48eef4733c8976e01d84113cf0a1f02 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 18:29:08 +0100 Subject: [PATCH 42/77] Try --- plugwise/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index bf4f3b04b..e4e912802 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -328,7 +328,6 @@ async def _smile_detect_legacy( async def async_update(self) -> dict[str, GwEntityData]: """Update the Plughwise Gateway entities and their data and states.""" - data: dict[str, GwEntityData] = {} try: data = await self._smile_api.async_update() except (DataMissingError, KeyError) as err: From 7c4bb99468f9b8ca14ff740c7686f9567fb1add0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 18 Dec 2025 18:31:39 +0100 Subject: [PATCH 43/77] Debug 2 --- plugwise/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index e4e912802..a5614c644 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -328,11 +328,13 @@ async def _smile_detect_legacy( async def async_update(self) -> dict[str, GwEntityData]: """Update the Plughwise Gateway entities and their data and states.""" + data: dict[str, GwEntityData] = {} try: data = await self._smile_api.async_update() except (DataMissingError, KeyError) as err: raise PlugwiseError("No Plugwise data received") from err + LOGGER.debug("HOI data: %s", data) return data ######################################################################################################## From 6d069f130388c6045a5a6fe111eef8935d3b62ed Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 19 Dec 2025 15:56:13 +0100 Subject: [PATCH 44/77] Detect appliance name-change --- plugwise/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 270af3612..226eac406 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -169,7 +169,10 @@ def _get_appliances(self) -> bool: continue self._new_appliances.append(appl.entity_id) - if appl.entity_id in self._existing_appliances: + if ( + appl.entity_id in self._existing_appliances + and self.gw_entities[appl.entity_id]["name"] == appl.name + ): continue self._create_gw_entities(appl) From 49cf501a53fddefaa85cf058014d0b64d69a2626 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 19 Dec 2025 16:35:56 +0100 Subject: [PATCH 45/77] Update test entity_items asserts and test-jsons - 2 --- fixtures/adam_heatpump_cooling/data.json | 207 +++++++++++++++--- fixtures/adam_jip/data.json | 111 ++++++++-- .../adam_multiple_devices_per_zone/data.json | 84 ++++++- .../data.json | 25 ++- fixtures/adam_plus_anna/data.json | 21 +- fixtures/adam_plus_anna_new/data.json | 60 ++++- .../data.json | 62 +++++- fixtures/adam_zone_per_device/data.json | 92 ++++++-- fixtures/anna_elga_2/data.json | 15 +- fixtures/anna_elga_2_cooling/data.json | 15 +- fixtures/anna_elga_2_schedule_off/data.json | 15 +- fixtures/anna_elga_no_cooling/data.json | 15 +- fixtures/anna_heatpump_cooling/data.json | 15 +- .../data.json | 15 +- fixtures/anna_heatpump_heating/data.json | 15 +- fixtures/anna_loria_cooling_active/data.json | 24 +- fixtures/anna_loria_driessens/data.json | 18 +- fixtures/anna_loria_heating_idle/data.json | 24 +- fixtures/anna_p1/data.json | 16 +- fixtures/anna_v4/data.json | 16 +- fixtures/anna_v4_dhw/data.json | 16 +- fixtures/anna_v4_no_tag/data.json | 16 +- fixtures/anna_without_boiler_fw441/data.json | 15 +- tests/test_anna.py | 8 +- tests/test_legacy_anna.py | 4 +- 25 files changed, 787 insertions(+), 137 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 71bfad7e2..60d15563c 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, @@ -58,6 +70,7 @@ }, "model": "Generic heater/cooler", "model_id": "17.1", + "module_id": "1ad05e10747b4e40ba2ba82f2872d1c1", "name": "OpenTherm", "sensors": { "dhw_temperature": 63.5, @@ -84,6 +97,7 @@ "location": "b52908550469425b812c87f766fe5303", "model": "Lisa", "model_id": "158-01", + "module_id": "1f0d0e98291145afa4da4432f76a7bd2", "name": "Thermostaat BK", "sensors": { "battery": 55, @@ -106,6 +120,7 @@ "location": "20e735858f8146cead98b873177a4f99", "model": "Plug", "model_id": "160-01", + "module_id": "0a00ddca4e9543c69c6648e5488590dd", "name": "Smart Plug DB", "sensors": { "electricity_consumed": 0.0, @@ -132,7 +147,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 +168,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, @@ -160,6 +187,7 @@ "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "model": "Plug", "model_id": "160-01", + "module_id": "3fa224c4c39f458583b2dab4515210bf", "name": "Smart Plug KK", "sensors": { "electricity_consumed": 2.13, @@ -180,6 +208,7 @@ "location": "04b15f6e884448288f811d29fb7b1b30", "model": "Plug", "model_id": "160-01", + "module_id": "483836101eb141e2b04045eedc3716ff", "name": "Smart Plug SJ", "sensors": { "electricity_consumed": 0.0, @@ -200,6 +229,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "Plug", "model_id": "160-01", + "module_id": "e20da25d0cbf456097aa1a954efed11b", "name": "Smart Plug WK", "sensors": { "electricity_consumed": 0.0, @@ -221,6 +251,7 @@ "location": "20e735858f8146cead98b873177a4f99", "model": "Lisa", "model_id": "158-01", + "module_id": "ddd4ed4873864199b6121459ae9fa4ae", "name": "Thermostaat DB", "sensors": { "setpoint": 18.0, @@ -248,7 +279,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 +299,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, @@ -275,6 +318,7 @@ "location": "9a27714b970547ee9a6bdadc2b815ad5", "model": "Plug", "model_id": "160-01", + "module_id": "2028add51f214a3dbddfa1706e63cfed", "name": "Smart Plug SQ", "sensors": { "electricity_consumed": 0.0, @@ -294,7 +338,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", @@ -325,6 +373,7 @@ "location": "e39529c79ab54fda9bed26cfc0447546", "model": "Lisa", "model_id": "158-01", + "module_id": "d2f732f328ba447abd5be12f2e196205", "name": "Thermostaat JM", "sensors": { "setpoint": 18.0, @@ -346,6 +395,7 @@ "location": "b52908550469425b812c87f766fe5303", "model": "Plug", "model_id": "160-01", + "module_id": "44fe408e4afd47c19928941ef5499298", "name": "Smart Plug BK", "sensors": { "electricity_consumed": 0.0, @@ -366,6 +416,7 @@ "location": "5cc21042f87f4b4c94ccb5537c47a53f", "model": "Plug", "model_id": "160-01", + "module_id": "1695cccaacc94580860544338b272ce0", "name": "Smart Plug BK2", "sensors": { "electricity_consumed": 0.0, @@ -392,7 +443,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 +464,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 +489,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 +509,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, @@ -453,6 +528,7 @@ "location": "e39529c79ab54fda9bed26cfc0447546", "model": "Plug", "model_id": "160-01", + "module_id": "9a3848f23b814b708f7f5bf15702c60d", "name": "Smart Plug JM", "sensors": { "electricity_consumed": 0.0, @@ -479,7 +555,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 +576,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, @@ -507,6 +595,7 @@ "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "model": "Plug", "model_id": "160-01", + "module_id": "3e205ba6cede43e5b461e7c76340a64d", "name": "Smart Plug RB", "sensors": { "electricity_consumed": 3.13, @@ -533,7 +622,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 +643,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 +668,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 +689,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, @@ -595,6 +708,7 @@ "location": "8cf650a4c10c44819e426bed406aec34", "model": "Plug", "model_id": "160-01", + "module_id": "7435452fbc684a30a4978913f342c68b", "name": "Smart Plug BK1", "sensors": { "electricity_consumed": 0.0, @@ -616,6 +730,7 @@ "location": "9a27714b970547ee9a6bdadc2b815ad5", "model": "Lisa", "model_id": "158-01", + "module_id": "6991158ce7774dca864ec8fcf7a039ab", "name": "Thermostaat SQ", "sensors": { "setpoint": 18.5, @@ -638,6 +753,7 @@ "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "model": "Lisa", "model_id": "158-01", + "module_id": "11e4f552602c4b03980e0955e0f114f0", "name": "Thermostaat RB", "sensors": { "setpoint": 17.0, @@ -657,6 +773,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "e2d52aece0524fde9c346953e5e1acb2", "name": "Thermostaat WK", "sensors": { "setpoint": 21.5, @@ -672,6 +789,7 @@ "location": "04b15f6e884448288f811d29fb7b1b30", "model": "Lisa", "model_id": "158-01", + "module_id": "21d57d51898b41c69ad87fffb59f2581", "name": "Thermostaat SJ", "sensors": { "setpoint": 20.5, @@ -699,7 +817,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 +838,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, @@ -731,6 +861,7 @@ "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "model": "Lisa", "model_id": "158-01", + "module_id": "0f19738aed2e4bc09e0ca832f2e0c5a4", "name": "Thermostaat KK", "sensors": { "battery": 53, @@ -754,6 +885,7 @@ "location": "8cf650a4c10c44819e426bed406aec34", "model": "Lisa", "model_id": "158-01", + "module_id": "efe84c28928a4ce08603024b5edc2fc7", "name": "Thermostaat BK1", "sensors": { "setpoint": 20.5, @@ -776,6 +908,7 @@ "location": "5cc21042f87f4b4c94ccb5537c47a53f", "model": "Lisa", "model_id": "158-01", + "module_id": "867bdfa029f042e2a50ab9974cff6fac", "name": "Thermostaat BK2", "sensors": { "setpoint": 20.5, @@ -803,7 +936,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 +957,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_jip/data.json b/fixtures/adam_jip/data.json index da7df0e27..3c44c416b 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -7,7 +7,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -20,11 +26,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], - "secondary": ["356b65335e274d769c338223e7af9c33"] + "primary": [ + "1346fbd8498d4dbcab7e18d51b771f3d" + ], + "secondary": [ + "356b65335e274d769c338223e7af9c33" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -34,7 +48,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": null, "select_zone_profile": "active", "sensors": { @@ -47,11 +67,19 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], - "secondary": ["833de10f269c4deab58fb9df69901b4e"] + "primary": [ + "f61f1a2535f54f52ad006a3d18e459ca" + ], + "secondary": [ + "833de10f269c4deab58fb9df69901b4e" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -64,6 +92,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Lisa", "model_id": "158-01", + "module_id": "9a08c0d05ffd4f02be9a9bdeb3d01175", "name": "Slaapkamer", "sensors": { "battery": 92, @@ -87,6 +116,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "e71d43382a894c9e888d379368aafba9", "name": "Tom Logeerkamer", "sensors": { "setpoint": 13.0, @@ -111,6 +141,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "ccc140dafdc5416dab052bffc465a770", "name": "Tom Slaapkamer", "sensors": { "setpoint": 13.0, @@ -133,6 +164,7 @@ "location": "9e4433a9d69f40b3aefd15e74395eaec", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "2ddb4057a8fd46aba92e23c770f3297d", "name": "Plug", "sensors": { "electricity_consumed_interval": 0.0 @@ -155,6 +187,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Lisa", "model_id": "158-01", + "module_id": "3f91eab3749349799b17f04873bde07e", "name": "Kinderkamer", "sensors": { "battery": 79, @@ -178,6 +211,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "fc657e19ee7442ab8bfe66df62cb40b3", "name": "Tom Woonkamer", "sensors": { "setpoint": 9.0, @@ -205,6 +239,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Lisa", "model_id": "158-01", + "module_id": "1814d63fb9824aa8aae4d4329d84dfa3", "name": "Logeerkamer", "sensors": { "battery": 80, @@ -226,7 +261,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", @@ -234,7 +273,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": { @@ -251,7 +295,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -264,11 +314,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], - "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] + "primary": [ + "6f3e9d7084214c21b9dfa46f6eeb8700" + ], + "secondary": [ + "d4496250d0e942cfa7aea3476e9070d5" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -278,6 +336,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "5785d8678bed443ea72b52a1c8a7108d", "name": "Tom Kinderkamer", "sensors": { "setpoint": 13.0, @@ -302,7 +361,13 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -315,11 +380,19 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": ["a6abc6a129ee499c88a4d420cc413b47"], - "secondary": ["1da4d325838e4ad8aac12177214505c9"] + "primary": [ + "a6abc6a129ee499c88a4d420cc413b47" + ], + "secondary": [ + "1da4d325838e4ad8aac12177214505c9" + ] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "e4684553153b44afbef2200885f379dc": { "available": true, @@ -344,6 +417,7 @@ }, "model": "Generic heater", "model_id": "10.20", + "module_id": "2bd6e83f0ae340058606c33503202c72", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -368,6 +442,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Jip", "model_id": "168-01", + "module_id": "73a5e7c19d3744ad96dfad74142d2db4", "name": "Woonkamer", "sensors": { "battery": 100, diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 364d71e59..0d258d362 100644 --- a/fixtures/adam_multiple_devices_per_zone/data.json +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -6,6 +6,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "4e1da90f22384bc691fe0282e02d272f", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -35,7 +36,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 +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, @@ -84,8 +97,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -96,6 +113,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a03128e5e9334b088c724fd96947c765", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 84.1, @@ -125,7 +143,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 +161,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -149,6 +175,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "822e635587994817a76599ea1190f9ee", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -170,6 +197,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a5a8713dd3f94f2a9d63db8a521af6b2", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -195,6 +223,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "b622e3c6a32544f8a4d83e3385592e36", "name": "Thermostatic Radiator Badkamer 1", "sensors": { "battery": 51, @@ -223,6 +252,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Lisa", "model_id": "158-01", + "module_id": "f887b0af3d1e45c794057ee606b21db8", "name": "Zone Thermostat Jessie", "sensors": { "battery": 37, @@ -245,6 +275,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", "model_id": "160-01", + "module_id": "800d5287643c4fd89dfcfbf336d4f7ec", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.6, @@ -273,7 +304,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 +322,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -311,6 +352,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "5ccda7375b0f467e88499a636450dc91", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -336,6 +378,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "39e077a2eb224dcea3415471de00823c", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -361,6 +404,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "02d1299fdbab4f7b93765e0af1c250d8", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -388,6 +432,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Lisa", "model_id": "158-01", + "module_id": "dd68d0641eb04571be62b9940aae363a", "name": "Zone Lisa WK", "sensors": { "battery": 34, @@ -418,7 +463,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 +483,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, @@ -444,6 +499,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -469,6 +525,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "468bbe14853f4fb18a8860333cecc42a", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -497,6 +554,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Lisa", "model_id": "158-01", + "module_id": "e5f81fd832d844e5bd46219831468a62", "name": "Zone Lisa Bios", "sensors": { "battery": 67, @@ -537,6 +595,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "d00e1ba75ed14b2388971b32abc94cde", "name": "CV Kraan Garage", "sensors": { "battery": 68, @@ -582,6 +641,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Lisa", "model_id": "158-01", + "module_id": "ebd9f53ab3894bee91e36350c1fbb6c7", "name": "Thermostatic Radiator Badkamer 2", "sensors": { "battery": 92, diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json index f822e33d8..77a452707 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", @@ -70,6 +74,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "e2d52aece0524fde9c346953e5e1acb2", "name": "Thermostaat WK", "sensors": { "setpoint": 21.5, @@ -90,7 +95,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 +116,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/data.json b/fixtures/adam_plus_anna/data.json index 8533e7468..00d4014dd 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" @@ -42,6 +53,7 @@ "upper_bound": 100.0 }, "model": "Generic heater", + "module_id": "94c63e8b46284f6ab2f40d19619afcba", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -58,6 +70,7 @@ "location": "45d410adf8fd461e85cebf16d5ead542", "model": "Plug", "model_id": "160-01", + "module_id": "0fd8411d0bc446a08c336a7bba029e22", "name": "MediaCenter", "sensors": { "electricity_consumed": 10.3, @@ -100,6 +113,7 @@ "location": "009490cc2f674ce6b576863fbb64f867", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "bb2fc3da88144d018ee51861e13f505d", "name": "Anna", "sensors": { "setpoint": 20.5, @@ -112,6 +126,7 @@ "dev_class": "computer_desktop_plug", "firmware": "2019-06-21T02:00:00+02:00", "location": "5ccb6c41a7d9403988d261ceee04239f", + "module_id": "72b2aa43d2ea4a33b23ade5e6629de8d", "name": "Work-PC", "sensors": { "electricity_consumed": 80.5, diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json index afa38abd8..fd36314d6 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -15,6 +15,7 @@ "upper_bound": 95.0 }, "model": "Generic heater", + "module_id": "c043b48fa65b4292b5579d5550f19dd2", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 22.5, @@ -29,6 +30,7 @@ "dev_class": "valve_actuator_plug", "location": "d9786723dbcf4f19b5c629a54629f9c7", "model_id": "TS0011", + "module_id": "c1f98356f09346b28e26a6ebc0f69275", "name": "Aanvoer water afsluiter (nous lz3)", "switches": { "relay": false @@ -46,6 +48,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Emma Pro", "model_id": "170-01", + "module_id": "85e363f2d0234f13885d41acd77ce6b8", "name": "Emma", "sensors": { "battery": 100, @@ -73,6 +76,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "86937b43514d44e090903d72e53d01b3", "name": "Tom Badkamer", "sensors": { "battery": 60, @@ -97,6 +101,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "fe0bb67baa774960a41ca3148137d646", "name": "Plug MediaTV", "sensors": { "electricity_consumed": 15.8, @@ -118,6 +123,7 @@ "location": "8201a2ac4d1b4303bf994e18d67311eb", "model": "Plug", "model_id": "160-01", + "module_id": "118ccd70e8fa4b1fa746c504a47d95e0", "name": "Plug Thermex Boiler", "sensors": { "electricity_consumed": 0.69, @@ -138,6 +144,7 @@ "location": "b4f211175e124df59603412bafa77a34", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "6fe74ec044bd44d88ac0412df67f188f", "name": "SmartPlug Floor 0", "sensors": { "electricity_consumed_interval": 0.0 @@ -156,6 +163,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "0251fb339b564a378009fcc3049f023c", "name": "Plug Vloerverwarming", "sensors": { "electricity_consumed": 45.0, @@ -174,6 +182,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "f7727a516f974a7e8bf8ae95b4531a7a", "name": "Anna", "sensors": { "setpoint": 20.5, @@ -202,7 +211,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", @@ -210,7 +223,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": { @@ -230,6 +248,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Jip", "model_id": "168-01", + "module_id": "702e95f0db7246bf831bad9fec7a68ff", "name": "Jip", "sensors": { "battery": 100, @@ -251,6 +270,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Lisa", "model_id": "158-01", + "module_id": "a9df3f54db5d4c0c84b6bf6804d41632", "name": "Lisa Badkamer", "sensors": { "battery": 71, @@ -297,7 +317,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": { @@ -320,7 +346,11 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": ["active", "off", "passive"] + "zone_profiles": [ + "active", + "off", + "passive" + ] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -336,7 +366,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": { @@ -351,10 +387,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 0a859e23a..2409023b9 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -15,6 +15,7 @@ "upper_bound": 95.0 }, "model": "Generic heater", + "module_id": "c043b48fa65b4292b5579d5550f19dd2", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -29,6 +30,7 @@ "dev_class": "valve_actuator_plug", "location": "d9786723dbcf4f19b5c629a54629f9c7", "model_id": "TS0011", + "module_id": "c1f98356f09346b28e26a6ebc0f69275", "name": "Aanvoer water afsluiter (nous lz3)", "switches": { "relay": false @@ -47,6 +49,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "86937b43514d44e090903d72e53d01b3", "name": "Tom Badkamer", "sensors": { "battery": 99, @@ -71,6 +74,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "fe0bb67baa774960a41ca3148137d646", "name": "Plug MediaTV", "sensors": { "electricity_consumed": 14.8, @@ -92,6 +96,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "118ccd70e8fa4b1fa746c504a47d95e0", "name": "Plug Werkplek", "sensors": { "electricity_consumed": 91.3, @@ -112,6 +117,7 @@ "location": "b4f211175e124df59603412bafa77a34", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "6fe74ec044bd44d88ac0412df67f188f", "name": "SmartPlug Floor 0", "sensors": { "electricity_consumed_interval": 0.0 @@ -130,6 +136,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", "model_id": "160-01", + "module_id": "0251fb339b564a378009fcc3049f023c", "name": "Plug Vloerverwarming", "sensors": { "electricity_consumed": 43.8, @@ -148,6 +155,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "f7727a516f974a7e8bf8ae95b4531a7a", "name": "Anna", "sensors": { "setpoint": 18.5, @@ -176,7 +184,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", @@ -184,7 +196,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": { @@ -204,6 +221,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Lisa", "model_id": "158-01", + "module_id": "a9df3f54db5d4c0c84b6bf6804d41632", "name": "Lisa Badkamer", "sensors": { "battery": 14, @@ -250,7 +268,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": { @@ -265,11 +289,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", @@ -285,7 +315,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": { @@ -300,10 +336,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 c40afc0ba..857dd7677 100644 --- a/fixtures/adam_zone_per_device/data.json +++ b/fixtures/adam_zone_per_device/data.json @@ -6,6 +6,7 @@ "location": "c4d2bda6df8146caa2e5c2b5dc65660e", "model": "Plug", "model_id": "160-01", + "module_id": "4e1da90f22384bc691fe0282e02d272f", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -35,7 +36,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 +54,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["f1fee6043d3642a9b0a65297455f008e"], - "secondary": ["680423ff840043738f42cc7f1ff97a36"] + "primary": [ + "f1fee6043d3642a9b0a65297455f008e" + ], + "secondary": [ + "680423ff840043738f42cc7f1ff97a36" + ] }, "vendor": "Plugwise" }, @@ -67,7 +78,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 +98,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + "primary": [ + "df4a4a8169904cdb9c03d61a21f42140" + ], + "secondary": [ + "a2c3583e0a6349358998b760cea82d2a" + ] }, "vendor": "Plugwise" }, @@ -93,6 +114,7 @@ "location": "4efbab4c8bb84fbab26c8decf670eb96", "model": "Plug", "model_id": "160-01", + "module_id": "a03128e5e9334b088c724fd96947c765", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 80.1, @@ -122,7 +144,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 +162,9 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "primary": [ + "e7693eb9582644e5b865dba8d4447cf1" + ], "secondary": [] }, "vendor": "Plugwise" @@ -146,6 +176,7 @@ "location": "0217e9743c174eef9d6e9f680d403ce2", "model": "Plug", "model_id": "160-01", + "module_id": "822e635587994817a76599ea1190f9ee", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -167,6 +198,7 @@ "location": "2b1591ecf6344d4d93b03dece9747648", "model": "Plug", "model_id": "160-01", + "module_id": "a5a8713dd3f94f2a9d63db8a521af6b2", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -192,6 +224,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "b622e3c6a32544f8a4d83e3385592e36", "name": "Thermostatic Radiator Badkamer", "sensors": { "battery": 51, @@ -220,6 +253,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Lisa", "model_id": "158-01", + "module_id": "f887b0af3d1e45c794057ee606b21db8", "name": "Zone Thermostat Jessie", "sensors": { "battery": 37, @@ -242,6 +276,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", "model_id": "160-01", + "module_id": "800d5287643c4fd89dfcfbf336d4f7ec", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.8, @@ -270,7 +305,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 +323,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + "primary": [ + "6a3bf693d05e48e0b460c815a4fdd09d" + ], + "secondary": [ + "d3da73bde12a47d5a6b8f9dad971f2ec" + ] }, "vendor": "Plugwise" }, @@ -308,6 +353,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "5ccda7375b0f467e88499a636450dc91", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -333,6 +379,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "39e077a2eb224dcea3415471de00823c", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -358,6 +405,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "02d1299fdbab4f7b93765e0af1c250d8", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -385,6 +433,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Lisa", "model_id": "158-01", + "module_id": "dd68d0641eb04571be62b9940aae363a", "name": "Zone Lisa WK", "sensors": { "battery": 34, @@ -415,7 +464,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 +484,12 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + "primary": [ + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "secondary": [ + "b310b72a0e354bfab43089919b9a88bf" + ] }, "vendor": "Plugwise" }, @@ -441,6 +500,7 @@ "location": "e704bae65654496f9cade9c855decdfe", "model": "Plug", "model_id": "160-01", + "module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -466,6 +526,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "468bbe14853f4fb18a8860333cecc42a", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -494,6 +555,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Lisa", "model_id": "158-01", + "module_id": "e5f81fd832d844e5bd46219831468a62", "name": "Zone Lisa Bios", "sensors": { "battery": 67, @@ -534,6 +596,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "d00e1ba75ed14b2388971b32abc94cde", "name": "CV Kraan Garage", "sensors": { "battery": 68, @@ -562,6 +625,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Lisa", "model_id": "158-01", + "module_id": "ebd9f53ab3894bee91e36350c1fbb6c7", "name": "Zone Thermostat Badkamer", "sensors": { "battery": 92, diff --git a/fixtures/anna_elga_2/data.json b/fixtures/anna_elga_2/data.json index e417927a2..86532596d 100644 --- a/fixtures/anna_elga_2/data.json +++ b/fixtures/anna_elga_2/data.json @@ -13,6 +13,7 @@ "dev_class": "heater_central", "location": "d34dfe6ab90b410c98068e75de3eb631", "model": "Generic heater/cooler", + "module_id": "c53888603af34264bbed2a05998ee572", "name": "OpenTherm", "sensors": { "domestic_hot_water_setpoint": 60.0, @@ -30,7 +31,10 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], + "available_schedules": [ + "Thermostat schedule", + "off" + ], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -38,8 +42,15 @@ "hardware": "6539-1301-5002", "location": "d3ce834534114348be628b61b26d9220", "model": "ThermoTouch", + "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "preset_modes": [ + "away", + "no_frost", + "vacation", + "home", + "asleep" + ], "select_schedule": "Thermostat schedule", "sensors": { "cooling_activation_outdoor_temperature": 24.0, diff --git a/fixtures/anna_elga_2_cooling/data.json b/fixtures/anna_elga_2_cooling/data.json index 0c417702b..e29afa85b 100644 --- a/fixtures/anna_elga_2_cooling/data.json +++ b/fixtures/anna_elga_2_cooling/data.json @@ -19,6 +19,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "c53888603af34264bbed2a05998ee572", "name": "OpenTherm", "sensors": { "domestic_hot_water_setpoint": 60.0, @@ -36,7 +37,10 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], + "available_schedules": [ + "Thermostat schedule", + "off" + ], "climate_mode": "auto", "control_state": "cooling", "dev_class": "thermostat", @@ -44,8 +48,15 @@ "hardware": "6539-1301-5002", "location": "d3ce834534114348be628b61b26d9220", "model": "ThermoTouch", + "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "preset_modes": [ + "away", + "no_frost", + "vacation", + "home", + "asleep" + ], "select_schedule": "Thermostat schedule", "sensors": { "cooling_activation_outdoor_temperature": 26.0, diff --git a/fixtures/anna_elga_2_schedule_off/data.json b/fixtures/anna_elga_2_schedule_off/data.json index 064a483d8..548bd5286 100644 --- a/fixtures/anna_elga_2_schedule_off/data.json +++ b/fixtures/anna_elga_2_schedule_off/data.json @@ -19,6 +19,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "c53888603af34264bbed2a05998ee572", "name": "OpenTherm", "sensors": { "domestic_hot_water_setpoint": 60.0, @@ -36,7 +37,10 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], + "available_schedules": [ + "Thermostat schedule", + "off" + ], "climate_mode": "heat_cool", "control_state": "idle", "dev_class": "thermostat", @@ -44,8 +48,15 @@ "hardware": "6539-1301-5002", "location": "d3ce834534114348be628b61b26d9220", "model": "ThermoTouch", + "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "preset_modes": [ + "away", + "no_frost", + "vacation", + "home", + "asleep" + ], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 26.0, diff --git a/fixtures/anna_elga_no_cooling/data.json b/fixtures/anna_elga_no_cooling/data.json index 23ec151d4..f81bda7b4 100644 --- a/fixtures/anna_elga_no_cooling/data.json +++ b/fixtures/anna_elga_no_cooling/data.json @@ -41,6 +41,7 @@ "upper_bound": 100.0 }, "model": "Generic heater", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 46.3, @@ -58,7 +59,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -66,8 +70,15 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "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_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index c722045a2..5243282bb 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -37,6 +37,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 41.5, @@ -55,7 +56,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -63,8 +67,15 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "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..bcca41647 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -37,6 +37,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 41.5, @@ -55,7 +56,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -63,8 +67,15 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "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..77a473317 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -43,6 +43,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 46.3, @@ -60,7 +61,10 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": ["standaard", "off"], + "available_schedules": [ + "standaard", + "off" + ], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -68,8 +72,15 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "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_loria_cooling_active/data.json b/fixtures/anna_loria_cooling_active/data.json index 8b6c7341e..592d2b75a 100644 --- a/fixtures/anna_loria_cooling_active/data.json +++ b/fixtures/anna_loria_cooling_active/data.json @@ -1,7 +1,11 @@ { "582dfbdace4d4aeb832923ce7d1ddda0": { "active_preset": "home", - "available_schedules": ["Winter", "Test ", "off"], + "available_schedules": [ + "Winter", + "Test ", + "off" + ], "climate_mode": "auto", "control_state": "cooling", "dev_class": "thermostat", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "15da035090b847e7a21f93e08c015ebc", "model": "ThermoTouch", + "module_id": "734af4309ab3417499e85d16e5750015", "name": "Anna", - "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], + "preset_modes": [ + "away", + "vacation", + "no_frost", + "home", + "asleep" + ], "select_schedule": "Winter", "sensors": { "illuminance": 45.0, @@ -61,7 +72,13 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], + "dhw_modes": [ + "off", + "auto", + "boost", + "eco", + "comfort" + ], "location": "674b657c138a41a291d315d7471deb06", "max_dhw_temperature": { "lower_bound": 35.0, @@ -77,6 +94,7 @@ }, "model": "Generic heater/cooler", "model_id": "173", + "module_id": "f3b09d3f16964c18a55ee7614afc3437", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { diff --git a/fixtures/anna_loria_driessens/data.json b/fixtures/anna_loria_driessens/data.json index 2519d1f45..3a8440db4 100644 --- a/fixtures/anna_loria_driessens/data.json +++ b/fixtures/anna_loria_driessens/data.json @@ -33,8 +33,15 @@ "hardware": "6539-1301-5002", "location": "fa70e08550c94de3a34feb27ecf31421", "model": "ThermoTouch", + "module_id": "ca2dedb4b4a14a89bfc6a42aa0053ddb", "name": "Anna", - "preset_modes": ["no_frost", "asleep", "vacation", "away", "home"], + "preset_modes": [ + "no_frost", + "asleep", + "vacation", + "away", + "home" + ], "select_schedule": "Verwarmen@9-23u", "sensors": { "illuminance": 5.5, @@ -67,7 +74,13 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": ["comfort", "eco", "off", "boost", "auto"], + "dhw_modes": [ + "comfort", + "eco", + "off", + "boost", + "auto" + ], "location": "82c15f65c9bf44c592d69e16139355e3", "max_dhw_temperature": { "lower_bound": 35.0, @@ -83,6 +96,7 @@ }, "model": "Generic heater/cooler", "model_id": "173", + "module_id": "007bd043e2764ddc99d42ac1a46a8841", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { diff --git a/fixtures/anna_loria_heating_idle/data.json b/fixtures/anna_loria_heating_idle/data.json index d1b640345..b04941dcb 100644 --- a/fixtures/anna_loria_heating_idle/data.json +++ b/fixtures/anna_loria_heating_idle/data.json @@ -1,7 +1,11 @@ { "582dfbdace4d4aeb832923ce7d1ddda0": { "active_preset": "home", - "available_schedules": ["Winter", "Test ", "off"], + "available_schedules": [ + "Winter", + "Test ", + "off" + ], "climate_mode": "auto", "control_state": "idle", "dev_class": "thermostat", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "15da035090b847e7a21f93e08c015ebc", "model": "ThermoTouch", + "module_id": "734af4309ab3417499e85d16e5750015", "name": "Anna", - "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], + "preset_modes": [ + "away", + "vacation", + "no_frost", + "home", + "asleep" + ], "select_schedule": "Winter", "sensors": { "illuminance": 45.0, @@ -61,7 +72,13 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], + "dhw_modes": [ + "off", + "auto", + "boost", + "eco", + "comfort" + ], "location": "674b657c138a41a291d315d7471deb06", "max_dhw_temperature": { "lower_bound": 35.0, @@ -77,6 +94,7 @@ }, "model": "Generic heater/cooler", "model_id": "173", + "module_id": "f3b09d3f16964c18a55ee7614afc3437", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { diff --git a/fixtures/anna_p1/data.json b/fixtures/anna_p1/data.json index fd0bc91fb..ee4b57ea4 100644 --- a/fixtures/anna_p1/data.json +++ b/fixtures/anna_p1/data.json @@ -1,7 +1,10 @@ { "1e5e55b958ac445583602f767cb45942": { "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], + "available_schedules": [ + "Thermostat schedule", + "off" + ], "climate_mode": "heat", "control_state": "idle", "dev_class": "thermostat", @@ -9,8 +12,15 @@ "hardware": "6539-1301-500", "location": "5b13651d79c4454684fd268850b1bff8", "model": "ThermoTouch", + "module_id": "4cac351dd8494d0fb4adbb75f4cdf89c", "name": "Anna", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": [ + "home", + "asleep", + "away", + "vacation", + "no_frost" + ], "select_schedule": "off", "sensors": { "illuminance": 2.0, @@ -42,6 +52,7 @@ "location": "da7be222ab3b420c927f3e49fade0304", "model": "Generic heater", "model_id": "HR24", + "module_id": "4641927b856f45638df120358f98da9a", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -77,6 +88,7 @@ "dev_class": "smartmeter", "location": "da7be222ab3b420c927f3e49fade0304", "model": "2MS212 SMR5.5", + "module_id": "0caec7b5fac2419bbb3aea7bc93170f1", "name": "P1", "sensors": { "electricity_consumed_off_peak_cumulative": 618.001, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index 7e6f138be..563bd837e 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", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", + "module_id": "807a45cbc950419c98ce4624bc27ff09", "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, @@ -72,6 +83,7 @@ }, "model": "Generic heater", "model_id": "2.32", + "module_id": "88c1299c194f4b39b857e369803c2481", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json index a560de161..f7ab1fb4b 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", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", + "module_id": "807a45cbc950419c98ce4624bc27ff09", "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, @@ -72,6 +83,7 @@ }, "model": "Generic heater", "model_id": "2.32", + "module_id": "88c1299c194f4b39b857e369803c2481", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json index 513e7ce20..7a6c43567 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", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "eb5309212bf5407bb143e5bfa3b18aee", "model": "ThermoTouch", + "module_id": "807a45cbc950419c98ce4624bc27ff09", "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, @@ -72,6 +83,7 @@ }, "model": "Generic heater", "model_id": "2.32", + "module_id": "88c1299c194f4b39b857e369803c2481", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, diff --git a/fixtures/anna_without_boiler_fw441/data.json b/fixtures/anna_without_boiler_fw441/data.json index 7e0b7cc4f..fc6a556b6 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", @@ -9,8 +13,15 @@ "hardware": "6539-1301-5002", "location": "c34c6864216446528e95d88985e714cc", "model": "ThermoTouch", + "module_id": "2174b15978334867a3d634a16d14ada8", "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/tests/test_anna.py b/tests/test_anna.py index 26f72bfcc..c67c3e66f 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -158,7 +158,7 @@ async def test_connect_anna_without_boiler_fw441(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 43 + assert self.entity_items == 42 assert not self.notifications result = await self.tinker_thermostat( @@ -216,7 +216,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 68 + assert self.entity_items == 45 await api.close_connection() await self.disconnect(server, client) @@ -551,7 +551,7 @@ async def test_connect_anna_p1(self): ) await self.device_test(api, "2025-11-02 00:00:01", testdata) - assert self.entity_items == 78 + assert self.entity_items == 79 await api.close_connection() await self.disconnect(server, client) @@ -572,7 +572,7 @@ async def test_connect_anna_v4_no_modules(self): ) await self.device_test(api, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 14 + assert self.entity_items == 12 await api.close_connection() await self.disconnect(server, client) diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index bf12e143c..521c89bed 100644 --- a/tests/test_legacy_anna.py +++ b/tests/test_legacy_anna.py @@ -30,7 +30,7 @@ async def test_connect_legacy_anna(self): await self.device_test(api, "2020-03-22 00:00:01", testdata) assert api.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.entity_items == 44 + assert self.entity_items == 46 assert not api.reboot result = await self.tinker_legacy_thermostat(api, schedule_on=False) @@ -65,7 +65,7 @@ async def test_connect_legacy_anna_2(self): await self.device_test(api, "2020-05-03 00:00:01", testdata) assert api.gateway_id == "be81e3f8275b4129852c4d8d550ae2eb" - assert self.entity_items == 44 + assert self.entity_items == 46 result = await self.tinker_legacy_thermostat(api) assert result From 8500aaf6e5c13ca59c117b8773921bb309e27b9c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 19 Dec 2025 17:26:01 +0100 Subject: [PATCH 46/77] Rework legacy - 2 --- plugwise/legacy/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 4f3c806c3..646611213 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -239,6 +239,7 @@ def _p1_smartmeter_info_finder(self, appl: Munch) -> None: appl.mac = None appl.model = self.smile.model appl.model_id = None + appl.module_id = None appl.name = "P1" appl.pwclass = "smartmeter" appl.zigbee_mac = None From af52ce774b6108d0c0fb60fd30a182ecce0f24f9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 19 Dec 2025 17:28:02 +0100 Subject: [PATCH 47/77] Update test entity_items asserts and test-jsons - 3 --- tests/test_p1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_p1.py b/tests/test_p1.py index 1c459d216..80af2b91a 100644 --- a/tests/test_p1.py +++ b/tests/test_p1.py @@ -28,7 +28,7 @@ async def test_connect_p1v4_442_single(self): await self.device_test(api, "2022-05-16 00:00:01", testdata) assert api.gateway_id == "a455b61e52394b2db5081ce025a430f3" - assert self.entity_items == 33 + assert self.entity_items == 34 assert not self.notifications # Now change some data and change directory reading xml from @@ -78,7 +78,7 @@ async def test_connect_p1v4_442_triple(self): await self.device_test(api, "2022-05-16 00:00:01", testdata) assert api.gateway_id == "03e65b16e4b247a29ae0d75a78cb492e" - assert self.entity_items == 42 + assert self.entity_items == 43 assert self.notifications await api.close_connection() From c3841de955f64847d1f905950eacb8bb9d478990 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 20 Dec 2025 16:51:11 +0100 Subject: [PATCH 48/77] Typing and other fixes --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 226eac406..4673a1003 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -856,7 +856,7 @@ def _scan_thermostats(self) -> None: self._existing_zones = self._new_zones self._new_zones = [] - def _match_and_rank_thermostats(self) -> dict[str, ThermoLoc]: + def _match_and_rank_thermostats(self) -> None: """Helper-function for _scan_thermostats(). Match thermostat-appliances with locations, rank them for locations with multiple thermostats. From 92bf5a7735f80db9635908b87a8d8e06f447d9c5 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 20 Dec 2025 16:58:33 +0100 Subject: [PATCH 49/77] Save updated fixtures --- fixtures/adam_heatpump_cooling/data.json | 186 +++--------------- fixtures/adam_jip/data.json | 101 ++-------- .../adam_multiple_devices_per_zone/data.json | 68 ++----- .../data.json | 24 +-- fixtures/adam_plus_anna/data.json | 17 +- fixtures/adam_plus_anna_new/data.json | 49 +---- .../data.json | 53 +---- fixtures/adam_zone_per_device/data.json | 76 ++----- fixtures/anna_elga_2/data.json | 13 +- fixtures/anna_elga_2_cooling/data.json | 13 +- fixtures/anna_elga_2_schedule_off/data.json | 13 +- fixtures/anna_elga_no_cooling/data.json | 13 +- fixtures/anna_heatpump_cooling/data.json | 13 +- .../data.json | 13 +- fixtures/anna_heatpump_heating/data.json | 13 +- fixtures/anna_loria_cooling_active/data.json | 22 +-- fixtures/anna_loria_driessens/data.json | 16 +- fixtures/anna_loria_heating_idle/data.json | 22 +-- fixtures/anna_p1/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 +- fixtures/legacy_anna/data.json | 2 + fixtures/legacy_anna_2/data.json | 2 + fixtures/m_adam_cooling/data.json | 6 + fixtures/m_adam_heating/data.json | 6 + fixtures/m_adam_jip/data.json | 10 + .../data.json | 16 ++ fixtures/m_anna_heatpump_cooling/data.json | 2 + fixtures/m_anna_heatpump_idle/data.json | 2 + fixtures/p1v4_442_single/data.json | 1 + fixtures/p1v4_442_triple/data.json | 1 + tests/data/adam/adam_heatpump_cooling.json | 186 +++--------------- tests/data/adam/adam_jip.json | 101 ++-------- .../adam/adam_multiple_devices_per_zone.json | 68 ++----- .../adam_onoff_cooling_fake_firmware.json | 24 +-- tests/data/adam/adam_plus_anna.json | 17 +- tests/data/adam/adam_plus_anna_new.json | 49 +---- tests/data/adam/adam_zone_per_device.json | 76 ++----- tests/data/anna/anna_v4.json | 14 +- 41 files changed, 271 insertions(+), 1106 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json index 60d15563c..ce4bcc63b 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, @@ -147,13 +135,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": { @@ -168,17 +150,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, @@ -279,13 +255,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": { @@ -299,17 +269,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, @@ -338,11 +302,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", @@ -443,13 +403,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": { @@ -464,17 +418,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", @@ -489,13 +437,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": { @@ -509,17 +451,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, @@ -555,13 +491,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": { @@ -576,17 +506,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, @@ -622,13 +546,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": { @@ -643,17 +561,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", @@ -668,13 +580,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": { @@ -689,17 +595,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, @@ -817,13 +717,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": { @@ -838,17 +732,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, @@ -936,13 +824,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": { @@ -957,16 +839,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_jip/data.json b/fixtures/adam_jip/data.json index 3c44c416b..e62bc5947 100644 --- a/fixtures/adam_jip/data.json +++ b/fixtures/adam_jip/data.json @@ -7,13 +7,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -26,19 +20,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "1346fbd8498d4dbcab7e18d51b771f3d" - ], - "secondary": [ - "356b65335e274d769c338223e7af9c33" - ] + "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], + "secondary": ["356b65335e274d769c338223e7af9c33"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -48,13 +34,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": null, "select_zone_profile": "active", "sensors": { @@ -67,19 +47,11 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": [ - "f61f1a2535f54f52ad006a3d18e459ca" - ], - "secondary": [ - "833de10f269c4deab58fb9df69901b4e" - ] + "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], + "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -261,11 +233,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", @@ -273,12 +241,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": { @@ -295,13 +258,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -314,19 +271,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "6f3e9d7084214c21b9dfa46f6eeb8700" - ], - "secondary": [ - "d4496250d0e942cfa7aea3476e9070d5" - ] + "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], + "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -361,13 +310,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -380,19 +323,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "a6abc6a129ee499c88a4d420cc413b47" - ], - "secondary": [ - "1da4d325838e4ad8aac12177214505c9" - ] + "primary": ["a6abc6a129ee499c88a4d420cc413b47"], + "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "e4684553153b44afbef2200885f379dc": { "available": true, diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json index 0d258d362..ac81da2f7 100644 --- a/fixtures/adam_multiple_devices_per_zone/data.json +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -36,13 +36,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 @@ -77,13 +71,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 +85,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -143,13 +127,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 @@ -161,9 +139,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -304,13 +280,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 @@ -322,12 +292,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -463,13 +429,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, @@ -483,12 +443,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 77a452707..a2dcb5111 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", @@ -95,13 +91,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": { @@ -116,16 +106,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/data.json b/fixtures/adam_plus_anna/data.json index 00d4014dd..ccb46dfb2 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 fd36314d6..3f65059ca 100644 --- a/fixtures/adam_plus_anna_new/data.json +++ b/fixtures/adam_plus_anna_new/data.json @@ -211,11 +211,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", @@ -223,12 +219,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": { @@ -317,13 +308,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": { @@ -346,11 +331,7 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -366,13 +347,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": { @@ -387,18 +362,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 2409023b9..b3b22c84c 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -184,11 +184,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", @@ -196,12 +192,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": { @@ -268,13 +259,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": { @@ -289,17 +274,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", @@ -315,13 +294,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": { @@ -336,18 +309,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 857dd7677..bc2bf4857 100644 --- a/fixtures/adam_zone_per_device/data.json +++ b/fixtures/adam_zone_per_device/data.json @@ -36,13 +36,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 @@ -54,12 +48,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "f1fee6043d3642a9b0a65297455f008e" - ], - "secondary": [ - "680423ff840043738f42cc7f1ff97a36" - ] + "primary": ["f1fee6043d3642a9b0a65297455f008e"], + "secondary": ["680423ff840043738f42cc7f1ff97a36"] }, "vendor": "Plugwise" }, @@ -78,13 +68,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, @@ -98,12 +82,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -144,13 +124,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 @@ -162,9 +136,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -305,13 +277,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 @@ -323,12 +289,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -464,13 +426,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, @@ -484,12 +440,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "b59bcebaf94b499ea7d46e4a66fb62d8" - ], - "secondary": [ - "b310b72a0e354bfab43089919b9a88bf" - ] + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] }, "vendor": "Plugwise" }, diff --git a/fixtures/anna_elga_2/data.json b/fixtures/anna_elga_2/data.json index 86532596d..77812c8a5 100644 --- a/fixtures/anna_elga_2/data.json +++ b/fixtures/anna_elga_2/data.json @@ -31,10 +31,7 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": [ - "Thermostat schedule", - "off" - ], + "available_schedules": ["Thermostat schedule", "off"], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -44,13 +41,7 @@ "model": "ThermoTouch", "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": [ - "away", - "no_frost", - "vacation", - "home", - "asleep" - ], + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], "select_schedule": "Thermostat schedule", "sensors": { "cooling_activation_outdoor_temperature": 24.0, diff --git a/fixtures/anna_elga_2_cooling/data.json b/fixtures/anna_elga_2_cooling/data.json index e29afa85b..035b39073 100644 --- a/fixtures/anna_elga_2_cooling/data.json +++ b/fixtures/anna_elga_2_cooling/data.json @@ -37,10 +37,7 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": [ - "Thermostat schedule", - "off" - ], + "available_schedules": ["Thermostat schedule", "off"], "climate_mode": "auto", "control_state": "cooling", "dev_class": "thermostat", @@ -50,13 +47,7 @@ "model": "ThermoTouch", "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": [ - "away", - "no_frost", - "vacation", - "home", - "asleep" - ], + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], "select_schedule": "Thermostat schedule", "sensors": { "cooling_activation_outdoor_temperature": 26.0, diff --git a/fixtures/anna_elga_2_schedule_off/data.json b/fixtures/anna_elga_2_schedule_off/data.json index 548bd5286..004398661 100644 --- a/fixtures/anna_elga_2_schedule_off/data.json +++ b/fixtures/anna_elga_2_schedule_off/data.json @@ -37,10 +37,7 @@ }, "ebd90df1ab334565b5895f37590ccff4": { "active_preset": "home", - "available_schedules": [ - "Thermostat schedule", - "off" - ], + "available_schedules": ["Thermostat schedule", "off"], "climate_mode": "heat_cool", "control_state": "idle", "dev_class": "thermostat", @@ -50,13 +47,7 @@ "model": "ThermoTouch", "module_id": "3b36454dda794c6faaed4053a89e80ce", "name": "Anna", - "preset_modes": [ - "away", - "no_frost", - "vacation", - "home", - "asleep" - ], + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], "select_schedule": "off", "sensors": { "cooling_activation_outdoor_temperature": 26.0, diff --git a/fixtures/anna_elga_no_cooling/data.json b/fixtures/anna_elga_no_cooling/data.json index f81bda7b4..6a1ac4438 100644 --- a/fixtures/anna_elga_no_cooling/data.json +++ b/fixtures/anna_elga_no_cooling/data.json @@ -59,10 +59,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 @@ "model": "ThermoTouch", "module_id": "e3204a14c278431a8890525dd83edf9d", "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_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json index 5243282bb..5d1868a4a 100644 --- a/fixtures/anna_heatpump_cooling/data.json +++ b/fixtures/anna_heatpump_cooling/data.json @@ -56,10 +56,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -69,13 +66,7 @@ "model": "ThermoTouch", "module_id": "e3204a14c278431a8890525dd83edf9d", "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 bcca41647..99d51e503 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -56,10 +56,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "heat_cool", "control_state": "cooling", "dev_class": "thermostat", @@ -69,13 +66,7 @@ "model": "ThermoTouch", "module_id": "e3204a14c278431a8890525dd83edf9d", "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 77a473317..b4ebdeace 100644 --- a/fixtures/anna_heatpump_heating/data.json +++ b/fixtures/anna_heatpump_heating/data.json @@ -61,10 +61,7 @@ }, "3cb70739631c4d17a86b8b12e8a5161b": { "active_preset": "home", - "available_schedules": [ - "standaard", - "off" - ], + "available_schedules": ["standaard", "off"], "climate_mode": "auto", "control_state": "heating", "dev_class": "thermostat", @@ -74,13 +71,7 @@ "model": "ThermoTouch", "module_id": "e3204a14c278431a8890525dd83edf9d", "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_loria_cooling_active/data.json b/fixtures/anna_loria_cooling_active/data.json index 592d2b75a..8e08679f5 100644 --- a/fixtures/anna_loria_cooling_active/data.json +++ b/fixtures/anna_loria_cooling_active/data.json @@ -1,11 +1,7 @@ { "582dfbdace4d4aeb832923ce7d1ddda0": { "active_preset": "home", - "available_schedules": [ - "Winter", - "Test ", - "off" - ], + "available_schedules": ["Winter", "Test ", "off"], "climate_mode": "auto", "control_state": "cooling", "dev_class": "thermostat", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "734af4309ab3417499e85d16e5750015", "name": "Anna", - "preset_modes": [ - "away", - "vacation", - "no_frost", - "home", - "asleep" - ], + "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], "select_schedule": "Winter", "sensors": { "illuminance": 45.0, @@ -72,13 +62,7 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": [ - "off", - "auto", - "boost", - "eco", - "comfort" - ], + "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], "location": "674b657c138a41a291d315d7471deb06", "max_dhw_temperature": { "lower_bound": 35.0, diff --git a/fixtures/anna_loria_driessens/data.json b/fixtures/anna_loria_driessens/data.json index 3a8440db4..7b1cd7e67 100644 --- a/fixtures/anna_loria_driessens/data.json +++ b/fixtures/anna_loria_driessens/data.json @@ -35,13 +35,7 @@ "model": "ThermoTouch", "module_id": "ca2dedb4b4a14a89bfc6a42aa0053ddb", "name": "Anna", - "preset_modes": [ - "no_frost", - "asleep", - "vacation", - "away", - "home" - ], + "preset_modes": ["no_frost", "asleep", "vacation", "away", "home"], "select_schedule": "Verwarmen@9-23u", "sensors": { "illuminance": 5.5, @@ -74,13 +68,7 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": [ - "comfort", - "eco", - "off", - "boost", - "auto" - ], + "dhw_modes": ["comfort", "eco", "off", "boost", "auto"], "location": "82c15f65c9bf44c592d69e16139355e3", "max_dhw_temperature": { "lower_bound": 35.0, diff --git a/fixtures/anna_loria_heating_idle/data.json b/fixtures/anna_loria_heating_idle/data.json index b04941dcb..7954e7d55 100644 --- a/fixtures/anna_loria_heating_idle/data.json +++ b/fixtures/anna_loria_heating_idle/data.json @@ -1,11 +1,7 @@ { "582dfbdace4d4aeb832923ce7d1ddda0": { "active_preset": "home", - "available_schedules": [ - "Winter", - "Test ", - "off" - ], + "available_schedules": ["Winter", "Test ", "off"], "climate_mode": "auto", "control_state": "idle", "dev_class": "thermostat", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "734af4309ab3417499e85d16e5750015", "name": "Anna", - "preset_modes": [ - "away", - "vacation", - "no_frost", - "home", - "asleep" - ], + "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], "select_schedule": "Winter", "sensors": { "illuminance": 45.0, @@ -72,13 +62,7 @@ "heating_state": false }, "dev_class": "heater_central", - "dhw_modes": [ - "off", - "auto", - "boost", - "eco", - "comfort" - ], + "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], "location": "674b657c138a41a291d315d7471deb06", "max_dhw_temperature": { "lower_bound": 35.0, diff --git a/fixtures/anna_p1/data.json b/fixtures/anna_p1/data.json index ee4b57ea4..055816f67 100644 --- a/fixtures/anna_p1/data.json +++ b/fixtures/anna_p1/data.json @@ -1,10 +1,7 @@ { "1e5e55b958ac445583602f767cb45942": { "active_preset": "home", - "available_schedules": [ - "Thermostat schedule", - "off" - ], + "available_schedules": ["Thermostat schedule", "off"], "climate_mode": "heat", "control_state": "idle", "dev_class": "thermostat", @@ -14,13 +11,7 @@ "model": "ThermoTouch", "module_id": "4cac351dd8494d0fb4adbb75f4cdf89c", "name": "Anna", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", "sensors": { "illuminance": 2.0, diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json index 563bd837e..ed80590c4 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", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "807a45cbc950419c98ce4624bc27ff09", "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 f7ab1fb4b..27dec8952 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", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "807a45cbc950419c98ce4624bc27ff09", "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 7a6c43567..3d9b8ee0e 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", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "807a45cbc950419c98ce4624bc27ff09", "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 fc6a556b6..1d99207a9 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", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "2174b15978334867a3d634a16d14ada8", "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/fixtures/legacy_anna/data.json b/fixtures/legacy_anna/data.json index 75c12a4c8..69cbb7063 100644 --- a/fixtures/legacy_anna/data.json +++ b/fixtures/legacy_anna/data.json @@ -22,6 +22,7 @@ "upper_bound": 90.0 }, "model": "Generic heater", + "module_id": "e24e9dcb7066426e812606ea5130aab5", "name": "OpenTherm", "sensors": { "dhw_temperature": 51.2, @@ -43,6 +44,7 @@ "hardware": "6539-1301-500", "location": "0000aaaa0000aaaa0000aaaa0000aa00", "model": "ThermoTouch", + "module_id": "49537ee71b3a4da0a324b87562ec8b5f", "name": "Anna", "preset_modes": ["away", "vacation", "asleep", "home", "no_frost"], "select_schedule": null, diff --git a/fixtures/legacy_anna_2/data.json b/fixtures/legacy_anna_2/data.json index 5f1ef01f9..806caaef9 100644 --- a/fixtures/legacy_anna_2/data.json +++ b/fixtures/legacy_anna_2/data.json @@ -9,6 +9,7 @@ "hardware": "6539-1301-5002", "location": "be81e3f8275b4129852c4d8d550ae2eb", "model": "ThermoTouch", + "module_id": "8ee7dfdf4d1c4ad58e6f8b274ff7da9c", "name": "Anna", "preset_modes": ["vacation", "away", "no_frost", "home", "asleep"], "select_schedule": "off", @@ -51,6 +52,7 @@ "upper_bound": 90.0 }, "model": "Generic heater", + "module_id": "43de3a9e223743aa8127e7bfe8e66fb2", "name": "OpenTherm", "sensors": { "dhw_temperature": 0.0, diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json index 9b95475eb..ac5fab278 100644 --- a/fixtures/m_adam_cooling/data.json +++ b/fixtures/m_adam_cooling/data.json @@ -16,6 +16,7 @@ "upper_bound": 95.0 }, "model": "Generic heater", + "module_id": "c043b48fa65b4292b5579d5550f19dd2", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 17.5, @@ -35,6 +36,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Emma Pro", "model_id": "170-01", + "module_id": "85e363f2d0234f13885d41acd77ce6b8", "name": "Emma", "sensors": { "battery": 100, @@ -62,6 +64,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "86937b43514d44e090903d72e53d01b3", "name": "Tom Badkamer", "sensors": { "battery": 60, @@ -84,6 +87,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "f7727a516f974a7e8bf8ae95b4531a7a", "name": "Anna", "sensors": { "setpoint": 23.5, @@ -146,6 +150,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Jip", "model_id": "168-01", + "module_id": "702e95f0db7246bf831bad9fec7a68ff", "name": "Jip", "sensors": { "battery": 100, @@ -167,6 +172,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Lisa", "model_id": "158-01", + "module_id": "a9df3f54db5d4c0c84b6bf6804d41632", "name": "Lisa Badkamer", "sensors": { "battery": 71, diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json index 47a8fdeb2..6cb4c1ce5 100644 --- a/fixtures/m_adam_heating/data.json +++ b/fixtures/m_adam_heating/data.json @@ -21,6 +21,7 @@ "upper_bound": 95.0 }, "model": "Generic heater", + "module_id": "c043b48fa65b4292b5579d5550f19dd2", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 38.1, @@ -40,6 +41,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Emma Pro", "model_id": "170-01", + "module_id": "85e363f2d0234f13885d41acd77ce6b8", "name": "Emma", "sensors": { "battery": 100, @@ -67,6 +69,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "86937b43514d44e090903d72e53d01b3", "name": "Tom Badkamer", "sensors": { "battery": 60, @@ -89,6 +92,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "ThermoTouch", "model_id": "143.1", + "module_id": "f7727a516f974a7e8bf8ae95b4531a7a", "name": "Anna", "sensors": { "setpoint": 20.0, @@ -145,6 +149,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Jip", "model_id": "168-01", + "module_id": "702e95f0db7246bf831bad9fec7a68ff", "name": "Jip", "sensors": { "battery": 100, @@ -166,6 +171,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "model": "Lisa", "model_id": "158-01", + "module_id": "a9df3f54db5d4c0c84b6bf6804d41632", "name": "Lisa Badkamer", "sensors": { "battery": 71, diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json index c9ffb7395..a28e5c480 100644 --- a/fixtures/m_adam_jip/data.json +++ b/fixtures/m_adam_jip/data.json @@ -63,6 +63,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Lisa", "model_id": "158-01", + "module_id": "9a08c0d05ffd4f02be9a9bdeb3d01175", "name": "Slaapkamer", "sensors": { "battery": 92, @@ -86,6 +87,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "e71d43382a894c9e888d379368aafba9", "name": "Tom Logeerkamer", "sensors": { "setpoint": 13.0, @@ -110,6 +112,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "ccc140dafdc5416dab052bffc465a770", "name": "Tom Slaapkamer", "sensors": { "setpoint": 13.0, @@ -132,6 +135,7 @@ "location": "9e4433a9d69f40b3aefd15e74395eaec", "model": "Aqara Smart Plug", "model_id": "lumi.plug.maeu01", + "module_id": "2ddb4057a8fd46aba92e23c770f3297d", "name": "Plug", "sensors": { "electricity_consumed_interval": 0.0 @@ -154,6 +158,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Lisa", "model_id": "158-01", + "module_id": "3f91eab3749349799b17f04873bde07e", "name": "Kinderkamer", "sensors": { "battery": 79, @@ -177,6 +182,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "fc657e19ee7442ab8bfe66df62cb40b3", "name": "Tom Woonkamer", "sensors": { "setpoint": 9.0, @@ -204,6 +210,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Lisa", "model_id": "158-01", + "module_id": "1814d63fb9824aa8aae4d4329d84dfa3", "name": "Logeerkamer", "sensors": { "battery": 80, @@ -277,6 +284,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "5785d8678bed443ea72b52a1c8a7108d", "name": "Tom Kinderkamer", "sensors": { "setpoint": 13.0, @@ -343,6 +351,7 @@ }, "model": "Generic heater", "model_id": "10.20", + "module_id": "2bd6e83f0ae340058606c33503202c72", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -367,6 +376,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "model": "Jip", "model_id": "168-01", + "module_id": "73a5e7c19d3744ad96dfad74142d2db4", "name": "Woonkamer", "sensors": { "battery": 100, diff --git a/fixtures/m_adam_multiple_devices_per_zone/data.json b/fixtures/m_adam_multiple_devices_per_zone/data.json index 126031795..febebd165 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/data.json @@ -6,6 +6,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "4e1da90f22384bc691fe0282e02d272f", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -96,6 +97,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a03128e5e9334b088c724fd96947c765", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 84.1, @@ -142,6 +144,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "822e635587994817a76599ea1190f9ee", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -163,6 +166,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "a5a8713dd3f94f2a9d63db8a521af6b2", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -188,6 +192,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "b622e3c6a32544f8a4d83e3385592e36", "name": "Thermostatic Radiator Badkamer 1", "sensors": { "battery": 51, @@ -216,6 +221,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Lisa", "model_id": "158-01", + "module_id": "f887b0af3d1e45c794057ee606b21db8", "name": "Zone Thermostat Jessie", "sensors": { "battery": 37, @@ -238,6 +244,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", "model_id": "160-01", + "module_id": "800d5287643c4fd89dfcfbf336d4f7ec", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.6, @@ -304,6 +311,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "5ccda7375b0f467e88499a636450dc91", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -329,6 +337,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "39e077a2eb224dcea3415471de00823c", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -354,6 +363,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "02d1299fdbab4f7b93765e0af1c250d8", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -381,6 +391,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "model": "Lisa", "model_id": "158-01", + "module_id": "dd68d0641eb04571be62b9940aae363a", "name": "Zone Lisa WK", "sensors": { "battery": 34, @@ -437,6 +448,7 @@ "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", "model_id": "160-01", + "module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -462,6 +474,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "468bbe14853f4fb18a8860333cecc42a", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -490,6 +503,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "model": "Lisa", "model_id": "158-01", + "module_id": "e5f81fd832d844e5bd46219831468a62", "name": "Zone Lisa Bios", "sensors": { "battery": 67, @@ -530,6 +544,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "model": "Tom/Floor", "model_id": "106-03", + "module_id": "d00e1ba75ed14b2388971b32abc94cde", "name": "CV Kraan Garage", "sensors": { "battery": 68, @@ -575,6 +590,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Lisa", "model_id": "158-01", + "module_id": "ebd9f53ab3894bee91e36350c1fbb6c7", "name": "Thermostatic Radiator Badkamer 2", "sensors": { "battery": 92, diff --git a/fixtures/m_anna_heatpump_cooling/data.json b/fixtures/m_anna_heatpump_cooling/data.json index ccfd816ff..7cfd6a650 100644 --- a/fixtures/m_anna_heatpump_cooling/data.json +++ b/fixtures/m_anna_heatpump_cooling/data.json @@ -43,6 +43,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 41.5, @@ -68,6 +69,7 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "name": "Anna", "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "select_schedule": "standaard", diff --git a/fixtures/m_anna_heatpump_idle/data.json b/fixtures/m_anna_heatpump_idle/data.json index 5a1cdebd3..d460009de 100644 --- a/fixtures/m_anna_heatpump_idle/data.json +++ b/fixtures/m_anna_heatpump_idle/data.json @@ -43,6 +43,7 @@ "upper_bound": 100.0 }, "model": "Generic heater/cooler", + "module_id": "1d1f157265a74d2886af70eeac1a2da2", "name": "OpenTherm", "sensors": { "dhw_temperature": 46.3, @@ -68,6 +69,7 @@ "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", "model": "ThermoTouch", + "module_id": "e3204a14c278431a8890525dd83edf9d", "name": "Anna", "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "select_schedule": "standaard", diff --git a/fixtures/p1v4_442_single/data.json b/fixtures/p1v4_442_single/data.json index 6dfcd7ee0..29effe959 100644 --- a/fixtures/p1v4_442_single/data.json +++ b/fixtures/p1v4_442_single/data.json @@ -19,6 +19,7 @@ "dev_class": "smartmeter", "location": "a455b61e52394b2db5081ce025a430f3", "model": "KFM5KAIFA-METER", + "module_id": "f2f7c257a0c8405f9a56582d3a22982d", "name": "P1", "sensors": { "electricity_consumed_off_peak_cumulative": 17643.423, diff --git a/fixtures/p1v4_442_triple/data.json b/fixtures/p1v4_442_triple/data.json index 943325d14..82ae72beb 100644 --- a/fixtures/p1v4_442_triple/data.json +++ b/fixtures/p1v4_442_triple/data.json @@ -23,6 +23,7 @@ "dev_class": "smartmeter", "location": "03e65b16e4b247a29ae0d75a78cb492e", "model": "XMX5LGF0010453051839", + "module_id": "560672c43a964ef29202bad5b8284985", "name": "P1", "sensors": { "electricity_consumed_off_peak_cumulative": 70537.898, diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index 60d15563c..ce4bcc63b 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.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, @@ -147,13 +135,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": { @@ -168,17 +150,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, @@ -279,13 +255,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": { @@ -299,17 +269,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, @@ -338,11 +302,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", @@ -443,13 +403,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": { @@ -464,17 +418,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", @@ -489,13 +437,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": { @@ -509,17 +451,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, @@ -555,13 +491,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": { @@ -576,17 +506,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, @@ -622,13 +546,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": { @@ -643,17 +561,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", @@ -668,13 +580,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": { @@ -689,17 +595,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, @@ -817,13 +717,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": { @@ -838,17 +732,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, @@ -936,13 +824,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": { @@ -957,16 +839,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/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index 3c44c416b..e62bc5947 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -7,13 +7,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Slaapkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -26,19 +20,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "1346fbd8498d4dbcab7e18d51b771f3d" - ], - "secondary": [ - "356b65335e274d769c338223e7af9c33" - ] + "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], + "secondary": ["356b65335e274d769c338223e7af9c33"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "13228dab8ce04617af318a2888b3c548": { "active_preset": "home", @@ -48,13 +34,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": null, "select_zone_profile": "active", "sensors": { @@ -67,19 +47,11 @@ "upper_bound": 30.0 }, "thermostats": { - "primary": [ - "f61f1a2535f54f52ad006a3d18e459ca" - ], - "secondary": [ - "833de10f269c4deab58fb9df69901b4e" - ] + "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], + "secondary": ["833de10f269c4deab58fb9df69901b4e"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "1346fbd8498d4dbcab7e18d51b771f3d": { "available": true, @@ -261,11 +233,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", @@ -273,12 +241,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": { @@ -295,13 +258,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Kinderkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -314,19 +271,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "6f3e9d7084214c21b9dfa46f6eeb8700" - ], - "secondary": [ - "d4496250d0e942cfa7aea3476e9070d5" - ] + "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], + "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "d4496250d0e942cfa7aea3476e9070d5": { "available": true, @@ -361,13 +310,7 @@ "dev_class": "climate", "model": "ThermoZone", "name": "Logeerkamer", - "preset_modes": [ - "home", - "asleep", - "away", - "vacation", - "no_frost" - ], + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": null, "select_zone_profile": "active", "sensors": { @@ -380,19 +323,11 @@ "upper_bound": 99.9 }, "thermostats": { - "primary": [ - "a6abc6a129ee499c88a4d420cc413b47" - ], - "secondary": [ - "1da4d325838e4ad8aac12177214505c9" - ] + "primary": ["a6abc6a129ee499c88a4d420cc413b47"], + "secondary": ["1da4d325838e4ad8aac12177214505c9"] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "e4684553153b44afbef2200885f379dc": { "available": true, diff --git a/tests/data/adam/adam_multiple_devices_per_zone.json b/tests/data/adam/adam_multiple_devices_per_zone.json index 0d258d362..ac81da2f7 100644 --- a/tests/data/adam/adam_multiple_devices_per_zone.json +++ b/tests/data/adam/adam_multiple_devices_per_zone.json @@ -36,13 +36,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 @@ -77,13 +71,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 +85,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -143,13 +127,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 @@ -161,9 +139,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -304,13 +280,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 @@ -322,12 +292,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -463,13 +429,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, @@ -483,12 +443,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "b59bcebaf94b499ea7d46e4a66fb62d8" - ], - "secondary": [ - "b310b72a0e354bfab43089919b9a88bf" - ] + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] }, "vendor": "Plugwise" }, diff --git a/tests/data/adam/adam_onoff_cooling_fake_firmware.json b/tests/data/adam/adam_onoff_cooling_fake_firmware.json index 77a452707..a2dcb5111 100644 --- a/tests/data/adam/adam_onoff_cooling_fake_firmware.json +++ b/tests/data/adam/adam_onoff_cooling_fake_firmware.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", @@ -95,13 +91,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": { @@ -116,16 +106,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/tests/data/adam/adam_plus_anna.json b/tests/data/adam/adam_plus_anna.json index 00d4014dd..ccb46dfb2 100644 --- a/tests/data/adam/adam_plus_anna.json +++ b/tests/data/adam/adam_plus_anna.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/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index fd36314d6..3f65059ca 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -211,11 +211,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", @@ -223,12 +219,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": { @@ -317,13 +308,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": { @@ -346,11 +331,7 @@ "secondary": [] }, "vendor": "Plugwise", - "zone_profiles": [ - "active", - "off", - "passive" - ] + "zone_profiles": ["active", "off", "passive"] }, "f871b8c4d63549319221e294e4f88074": { "active_preset": "vacation", @@ -366,13 +347,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": { @@ -387,18 +362,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/tests/data/adam/adam_zone_per_device.json b/tests/data/adam/adam_zone_per_device.json index 857dd7677..bc2bf4857 100644 --- a/tests/data/adam/adam_zone_per_device.json +++ b/tests/data/adam/adam_zone_per_device.json @@ -36,13 +36,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 @@ -54,12 +48,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "f1fee6043d3642a9b0a65297455f008e" - ], - "secondary": [ - "680423ff840043738f42cc7f1ff97a36" - ] + "primary": ["f1fee6043d3642a9b0a65297455f008e"], + "secondary": ["680423ff840043738f42cc7f1ff97a36"] }, "vendor": "Plugwise" }, @@ -78,13 +68,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, @@ -98,12 +82,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "df4a4a8169904cdb9c03d61a21f42140" - ], - "secondary": [ - "a2c3583e0a6349358998b760cea82d2a" - ] + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] }, "vendor": "Plugwise" }, @@ -144,13 +124,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 @@ -162,9 +136,7 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "e7693eb9582644e5b865dba8d4447cf1" - ], + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], "secondary": [] }, "vendor": "Plugwise" @@ -305,13 +277,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 @@ -323,12 +289,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "6a3bf693d05e48e0b460c815a4fdd09d" - ], - "secondary": [ - "d3da73bde12a47d5a6b8f9dad971f2ec" - ] + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] }, "vendor": "Plugwise" }, @@ -464,13 +426,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, @@ -484,12 +440,8 @@ "upper_bound": 100.0 }, "thermostats": { - "primary": [ - "b59bcebaf94b499ea7d46e4a66fb62d8" - ], - "secondary": [ - "b310b72a0e354bfab43089919b9a88bf" - ] + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] }, "vendor": "Plugwise" }, diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 563bd837e..ed80590c4 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.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", @@ -15,13 +11,7 @@ "model": "ThermoTouch", "module_id": "807a45cbc950419c98ce4624bc27ff09", "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, From bc46356699b68e9174de99ad6d1d43b25598e774 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 20 Dec 2025 19:54:31 +0100 Subject: [PATCH 50/77] Adapt _get_zigbee_availability() after rebase --- plugwise/data.py | 2 +- plugwise/helper.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index 12f10a510..fdd647e77 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -196,7 +196,7 @@ def _get_entity_data(self, entity_id: str, entity: GwEntityData) -> None: entity, "heater_central", "no OpenTherm communication" ) # Zigbee node availability - self._get_zigbee_availability(data, entity) + self._get_zigbee_availability(entity) # Switching groups data self._entity_switching_group(entity) diff --git a/plugwise/helper.py b/plugwise/helper.py index 4673a1003..2c5a66697 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -448,15 +448,13 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None: entity.update(data) - def _get_zigbee_availability( - self, data: GwEntityData, entity: GwEntityData - ) -> None: + def _get_zigbee_availability(self, entity: GwEntityData) -> None: # Check zigbee device availability if "module_id" in entity: module_id = entity["module_id"] locator = f'./module[@id="{module_id}"]/protocols/zig_bee_node' if (module := self._domain_objects.find(locator)) is not None: - data["available"] = module.find("reachable").text == "true" + entity["available"] = module.find("reachable").text == "true" def _collect_group_sensors( self, From 10a0973888d7f59861488634060325b0d05f0a7c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 16:05:35 +0100 Subject: [PATCH 51/77] Clean up after rebase --- plugwise/helper.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 2c5a66697..433724da8 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -157,13 +157,6 @@ def _get_appliances(self) -> bool: extend_plug_device_class(appl, appliance) - # Extend device_class name of Plugs (Plugwise and Aqara) - Pw-Beta Issue #739 - description = appliance.find("description").text - if description is not None and ( - "ZigBee protocol" in description or "smart plug" in description - ): - appl.pwclass = f"{appl.pwclass}_plug" - # Collect appliance info, skip orphaned/removed devices if not (appl := self._appliance_info_finder(appl, appliance)): continue From 046ff4ca0da85851eb9a87827aaaa045afde4f3c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 16:15:51 +0100 Subject: [PATCH 52/77] Fixes rebase issues --- plugwise/helper.py | 10 +++++----- plugwise/smile.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 433724da8..9e3542489 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -264,11 +264,6 @@ def _get_locations(self) -> None: f"./location[@id='{loc.loc_id}']" ) - if counter == 0: - raise KeyError( - "Error, location Home (building) not found!" - ) # pragma: no cover - removed = list(set(self._existing_locations) - set(self._new_locations)) if self._existing_locations and removed: for location_id in removed: @@ -277,6 +272,11 @@ def _get_locations(self) -> None: self._existing_locations = self._new_locations self._new_locations = [] + if counter == 0: + raise KeyError( + "Error, location Home (building) not found!" + ) # pragma: no cover + def _appliance_info_finder(self, appl: Munch, appliance: etree.Element) -> Munch: """Collect info for all appliances found.""" match appl.pwclass: diff --git a/plugwise/smile.py b/plugwise/smile.py index 9704643f5..2846e4c75 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -114,6 +114,7 @@ def get_all_gateway_entities(self) -> None: self._get_appliances_with_offset_functionality() ) + self._scan_thermostats() self._get_groups() self._all_entity_data() From d73239da26aa736e77192821c6316285018b1931 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 16:39:12 +0100 Subject: [PATCH 53/77] Handle group name change, improve guarding --- plugwise/common.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 80027d560..bc1728532 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -205,16 +205,23 @@ def _get_groups(self) -> None: for group in self._domain_objects.findall("./group"): members: list[str] = [] group_id = group.get("id") + group_name = group.find("name").text + if group_id is None: + continue # pragma: no cover + self._new_groups.append(group_id) - if group_id in self._existing_groups: + if ( + group_id in self._existing_groups + and self.gw_entities[group_id]["name"] == group_name + ): continue - group_name = group.find("name").text + group_type = group.find("type").text group_appliances = group.findall("appliances/appliance") for item in group_appliances: self._add_member(item, members) - if group_type in GROUP_TYPES and members and group_id: + if group_type in GROUP_TYPES and members: self.gw_entities[group_id] = { "dev_class": group_type, "model": "Group", From 8e5a2a3aab30469d0dd79b4963140e78874c5145 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 16:44:46 +0100 Subject: [PATCH 54/77] More fixing after rebase --- plugwise/common.py | 2 +- plugwise/helper.py | 15 ++++++++------- plugwise/legacy/helper.py | 1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index bc1728532..b7842e1b2 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -215,7 +215,7 @@ def _get_groups(self) -> None: and self.gw_entities[group_id]["name"] == group_name ): continue - + group_type = group.find("type").text group_appliances = group.findall("appliances/appliance") for item in group_appliances: diff --git a/plugwise/helper.py b/plugwise/helper.py index 9e3542489..02777e81f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -243,6 +243,14 @@ def _get_locations(self) -> None: loc.loc_id = location.get("id") loc.name = location.find("name").text loc._type = location.find("type").text + # Home location is of type building + if loc._type == "building": + counter += 1 + self._home_loc_id = loc.loc_id + self._home_location = self._domain_objects.find( + f"./location[@id='{loc.loc_id}']" + ) + self._new_locations.append(loc.loc_id) if ( loc.loc_id in self._existing_locations @@ -256,13 +264,6 @@ def _get_locations(self) -> None: "primary_prio": 0, "secondary": [], } - # Home location is of type building - if loc._type == "building": - counter += 1 - self._home_loc_id = loc.loc_id - self._home_location = self._domain_objects.find( - f"./location[@id='{loc.loc_id}']" - ) removed = list(set(self._existing_locations) - set(self._new_locations)) if self._existing_locations and removed: diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 646611213..5e4bc8641 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -108,6 +108,7 @@ def _get_appliances(self) -> None: appl.mac = None appl.model = appl.pwclass.replace("_", " ").title() appl.model_id = None + appl.module_id = None appl.name = appliance.find("name").text appl.vendor_name = None appl.zigbee_mac = None From 2dd35260cc92bc8788ef34394774c80fc5173b34 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 16:58:37 +0100 Subject: [PATCH 55/77] Finish zone logic --- plugwise/helper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 02777e81f..fd2a4141a 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -694,7 +694,6 @@ def _get_gateway_outdoor_temp(self, entity_id: str, data: GwEntityData) -> None: locator = "./logs/point_log[type='outdoor_temperature']/period/measurement" if (found := self._home_location.find(locator)) is not None: value = format_measure(found.text, NONE) - LOGGER.debug("HOI outdoor_temp = %s", value) data.update({"sensors": {"outdoor_temperature": value}}) self._count += 1 @@ -828,6 +827,12 @@ def _scan_thermostats(self) -> None: for location_id, location in self._loc_data.items(): if location["primary_prio"] != 0: self._new_zones.append(location_id) + if ( + location_id in self._existing_zones + and self.gw_entities[location_id]["name"] == location["name"] + ): + continue + self._zones[location_id] = { "dev_class": "climate", "model": "ThermoZone", From 8a6934faf0fb934580a87e7c01b400ef99cc8326 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 22 Dec 2025 17:03:37 +0100 Subject: [PATCH 56/77] Add comments --- plugwise/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index fd2a4141a..29d133aed 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -201,9 +201,11 @@ def _add_p1_smartmeter_info(self) -> None: if not module_data["contents"]: # pragma: no cover return + # Detect a smartmeter change module_id = module_data["module_id"] if module_id in ( self.gw_entities[self._gateway_id].get("module_id"), + # legacy self.gw_entities.get(self._home_loc_id, {}).get("module_id"), ): return From b8acdfbd08564d2b125b6d81318b6eef27b5d1a3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 23 Dec 2025 13:22:38 +0100 Subject: [PATCH 57/77] Improve _get_appliances() return logic --- plugwise/helper.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 29d133aed..c7dd53af9 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -178,14 +178,18 @@ def _get_appliances(self) -> bool: self._reorder_devices() removed = list(set(self._existing_appliances) - set(self._new_appliances)) + new = list(set(self._new_appliances) - set(self._existing_appliances)) if self._existing_appliances: for appliance in removed: self.gw_entities.pop(appliance) - return False self._existing_appliances = self._new_appliances self._new_appliances = [] - return True + + if new: + return True + + return False def _add_p1_smartmeter_info(self) -> None: """For P1 collect the smartmeter info from the Home/building location and add it as an entity. From 6ac5bbd4260b2e985b95883beb1208d6250ff7b8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 23 Dec 2025 13:53:51 +0100 Subject: [PATCH 58/77] Set to v1.12.0a1 for testing --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5fadb3e00..3d26bc7e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.11.1" +version = "1.12.0a1" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 1409d3ccaed575a7004f964c7e2f80afc54d82e8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 23 Dec 2025 20:40:20 +0100 Subject: [PATCH 59/77] Try --- plugwise/helper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index c7dd53af9..a41c5a1c1 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -157,10 +157,6 @@ def _get_appliances(self) -> bool: extend_plug_device_class(appl, appliance) - # Collect appliance info, skip orphaned/removed devices - if not (appl := self._appliance_info_finder(appl, appliance)): - continue - self._new_appliances.append(appl.entity_id) if ( appl.entity_id in self._existing_appliances @@ -168,6 +164,11 @@ def _get_appliances(self) -> bool: ): continue + # Collect appliance info, skip orphaned/removed devices + if not (appl := self._appliance_info_finder(appl, appliance)): + self._new_appliances.pop() + continue + self._create_gw_entities(appl) # A smartmeter is not present as an appliance, add it specifically From 202c45225f5e5aa6d926561b76bb052a8e61e4cd Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 10:02:55 +0100 Subject: [PATCH 60/77] Correct entity-assert --- tests/test_anna.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index c67c3e66f..0058132e6 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -216,7 +216,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 45 + assert self.entity_items == 68 await api.close_connection() await self.disconnect(server, client) From ce70539b5d8a85aac2d7815cc75d4a4ac0148098 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 10:12:24 +0100 Subject: [PATCH 61/77] Add entity-assert test for updating --- tests/test_adam.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_adam.py b/tests/test_adam.py index c860accc5..b71945dd4 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -154,6 +154,7 @@ async def test_connect_adam_plus_anna_new(self): await self.device_test( api, "2022-01-16 00:00:01", testdata_updated, initialize=False ) + assert self.entity_items == 241 # Simulate receiving no xml-data after a requesting a reboot of the gateway self.smile_setup = "reboot/adam_plus_anna_new" From 726f25c29f5a0c590a4d2ba8c9f1e93d488d907e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 10:50:45 +0100 Subject: [PATCH 62/77] Guard for appliances with changed names --- plugwise/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index a41c5a1c1..6c7124613 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -160,7 +160,10 @@ def _get_appliances(self) -> bool: self._new_appliances.append(appl.entity_id) if ( appl.entity_id in self._existing_appliances - and self.gw_entities[appl.entity_id]["name"] == appl.name + and ( + appl.name in ("Gateway", "Central heating boiler") + or self.gw_entities[appl.entity_id]["name"] == appl.name + ) ): continue From 6389d433f3ba2940f2730f3571f45095cf28ccba Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 10:54:59 +0100 Subject: [PATCH 63/77] Correct updated 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 b71945dd4..acbc40ad2 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -154,7 +154,7 @@ async def test_connect_adam_plus_anna_new(self): await self.device_test( api, "2022-01-16 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 241 + assert self.entity_items == 109 # Simulate receiving no xml-data after a requesting a reboot of the gateway self.smile_setup = "reboot/adam_plus_anna_new" From edeb5be5ea31fb418d77c32affacb53d3b45b045 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 11:02:51 +0100 Subject: [PATCH 64/77] Fix logic, don't base on names --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 6c7124613..ce2fe9e51 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -161,7 +161,7 @@ def _get_appliances(self) -> bool: if ( appl.entity_id in self._existing_appliances and ( - appl.name in ("Gateway", "Central heating boiler") + appl.pwclass in ("gateway", "heater_central") or self.gw_entities[appl.entity_id]["name"] == appl.name ) ): From 4c6cab929fe99a4b7b37d807d9eed46ac157fa54 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 11:06:18 +0100 Subject: [PATCH 65/77] Correct 2nd updated entity-assert --- tests/test_anna.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index 0058132e6..c67c3e66f 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -216,7 +216,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( api, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 68 + assert self.entity_items == 45 await api.close_connection() await self.disconnect(server, client) From e7499b6b362bde5ff03612838d519cfaf619a051 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 11:07:34 +0100 Subject: [PATCH 66/77] Ruffed --- plugwise/helper.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index ce2fe9e51..9f5e3a845 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -158,12 +158,9 @@ def _get_appliances(self) -> bool: extend_plug_device_class(appl, appliance) self._new_appliances.append(appl.entity_id) - if ( - appl.entity_id in self._existing_appliances - and ( - appl.pwclass in ("gateway", "heater_central") - or self.gw_entities[appl.entity_id]["name"] == appl.name - ) + if appl.entity_id in self._existing_appliances and ( + appl.pwclass in ("gateway", "heater_central") + or self.gw_entities[appl.entity_id]["name"] == appl.name ): continue From d99b49d59348e09aa123e278124ede79ff1b7b28 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 11:10:17 +0100 Subject: [PATCH 67/77] Clean up --- plugwise/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index a5614c644..bf4f3b04b 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -334,7 +334,6 @@ async def async_update(self) -> dict[str, GwEntityData]: except (DataMissingError, KeyError) as err: raise PlugwiseError("No Plugwise data received") from err - LOGGER.debug("HOI data: %s", data) return data ######################################################################################################## From 03e4a89e8e9305df9cef7628d258334be6a2e74d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 11:42:31 +0100 Subject: [PATCH 68/77] Improve _add_or_update_notifications() --- plugwise/data.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index fdd647e77..c14b116d2 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -107,16 +107,17 @@ def _add_or_update_notifications( self, entity_id: str, entity: GwEntityData ) -> None: """Helper-function adding or updating the Plugwise notifications.""" - if ( - entity_id == self._gateway_id - and (self._is_thermostat or self.smile.type == "power") - ) or ( - "binary_sensors" in entity - and "plugwise_notification" in entity["binary_sensors"] - ): - entity["binary_sensors"]["plugwise_notification"] = bool( - self._notifications - ) + + if entity_id != self._gateway_id: + return + + if (self._is_thermostat or self.smile.type == "power") and "binary_sensors" not in entity: + entity.update({"binary_sensors": {"plugwise_notification": bool(self._notifications)}}) + entity.update({"notifications": self._notifications}) + self._count += 2 + + if "plugwise_notification" in entity["binary_sensors"]: + entity["binary_sensors"]["plugwise_notification"] = bool(self._notifications) entity["notifications"] = self._notifications self._count += 2 From 7fc044458cb57b5fae1d9700bbb3d6b502aa9c62 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 12:05:13 +0100 Subject: [PATCH 69/77] Improve logic --- plugwise/data.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index c14b116d2..ca46a390c 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -111,15 +111,16 @@ def _add_or_update_notifications( if entity_id != self._gateway_id: return - if (self._is_thermostat or self.smile.type == "power") and "binary_sensors" not in entity: - entity.update({"binary_sensors": {"plugwise_notification": bool(self._notifications)}}) - entity.update({"notifications": self._notifications}) - self._count += 2 - - if "plugwise_notification" in entity["binary_sensors"]: - entity["binary_sensors"]["plugwise_notification"] = bool(self._notifications) - entity["notifications"] = self._notifications - self._count += 2 + if self._is_thermostat or self.smile.type == "power": + if "plugwise_notification" not in entity: + entity["binary_sensors"].update({"plugwise_notification": bool(self._notifications)}) + entity.update({"notifications": self._notifications}) + self._count += 2 + + else: + entity["binary_sensors"]["plugwise_notification"] = bool(self._notifications) + entity["notifications"] = self._notifications + self._count += 2 def _update_for_cooling(self, entity: GwEntityData) -> None: """Helper-function for adding/updating various cooling-related values.""" From a224806f1444d9153d4a7eeec6b987aa04bba146 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 12:28:56 +0100 Subject: [PATCH 70/77] Bump to a2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d26bc7e2..0d2f33cda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.12.0a1" +version = "1.12.0a2" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 6a4d25a03c8a328efc265d215988b7731c39bfb2 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 12:36:30 +0100 Subject: [PATCH 71/77] _get_appliances(): return also True for removed appliances --- plugwise/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 9f5e3a845..ace2be421 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -178,8 +178,8 @@ def _get_appliances(self) -> bool: # Sort the gw_entities self._reorder_devices() - removed = list(set(self._existing_appliances) - set(self._new_appliances)) new = list(set(self._new_appliances) - set(self._existing_appliances)) + removed = list(set(self._existing_appliances) - set(self._new_appliances)) if self._existing_appliances: for appliance in removed: self.gw_entities.pop(appliance) @@ -187,7 +187,7 @@ def _get_appliances(self) -> bool: self._existing_appliances = self._new_appliances self._new_appliances = [] - if new: + if new or removed: return True return False From 995d57768d21542996eb996668014a2a233f7f70 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 12:41:58 +0100 Subject: [PATCH 72/77] Implement _get_groups() enhancement as suggested --- plugwise/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugwise/common.py b/plugwise/common.py index b7842e1b2..ea096b2da 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -230,6 +230,9 @@ def _get_groups(self) -> None: "vendor": "Plugwise", } self._count += 5 + elif group_id in self._existing_groups: + # Group existed but now has no valid members -> remove + self._new_groups.remove(group_id) removed = list(set(self._existing_groups) - set(self._new_groups)) if self._existing_groups and removed: From 3f2843634306493e87aee1e071be541fd1f8bdeb Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 12:44:01 +0100 Subject: [PATCH 73/77] Implement pop-suggestion --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index ace2be421..7572b92f9 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -855,7 +855,7 @@ def _scan_thermostats(self) -> None: removed = list(set(self._existing_zones) - set(self._new_zones)) if self._existing_zones and removed: for location_id in removed: - self._zones.pop(location_id) + self._zones.pop(location_id, None) self._existing_zones = self._new_zones self._new_zones = [] From b96e79df1e5d55b990c2be67b3a9419347291f1c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 13:09:34 +0100 Subject: [PATCH 74/77] Ruffed, bump to a3 --- plugwise/data.py | 8 ++++++-- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index ca46a390c..c3d3340a1 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -113,12 +113,16 @@ def _add_or_update_notifications( if self._is_thermostat or self.smile.type == "power": if "plugwise_notification" not in entity: - entity["binary_sensors"].update({"plugwise_notification": bool(self._notifications)}) + entity["binary_sensors"].update( + {"plugwise_notification": bool(self._notifications)} + ) entity.update({"notifications": self._notifications}) self._count += 2 else: - entity["binary_sensors"]["plugwise_notification"] = bool(self._notifications) + entity["binary_sensors"]["plugwise_notification"] = bool( + self._notifications + ) entity["notifications"] = self._notifications self._count += 2 diff --git a/pyproject.toml b/pyproject.toml index 0d2f33cda..e1bf5a8ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.12.0a2" +version = "1.12.0a3" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 8e7f1a962406141d1c880fcb8a9c4b444e7d33a9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 13:26:42 +0100 Subject: [PATCH 75/77] Don't double-count notification-related --- plugwise/data.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/data.py b/plugwise/data.py index c3d3340a1..588489b5c 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -124,7 +124,6 @@ def _add_or_update_notifications( self._notifications ) entity["notifications"] = self._notifications - self._count += 2 def _update_for_cooling(self, entity: GwEntityData) -> None: """Helper-function for adding/updating various cooling-related values.""" From 5f4350ae2adb3c6c3268e5f8394f59f1f7f4f462 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 13:31:44 +0100 Subject: [PATCH 76/77] Rename to _update_zigbee_availability(), add docstring --- plugwise/data.py | 2 +- plugwise/helper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugwise/data.py b/plugwise/data.py index 588489b5c..bfe1d7926 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -201,7 +201,7 @@ def _get_entity_data(self, entity_id: str, entity: GwEntityData) -> None: entity, "heater_central", "no OpenTherm communication" ) # Zigbee node availability - self._get_zigbee_availability(entity) + self._update_zigbee_availability(entity) # Switching groups data self._entity_switching_group(entity) diff --git a/plugwise/helper.py b/plugwise/helper.py index 7572b92f9..c0fc9fdbe 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -449,8 +449,8 @@ def _get_measurement_data(self, entity_id: str, entity: GwEntityData) -> None: entity.update(data) - def _get_zigbee_availability(self, entity: GwEntityData) -> None: - # Check zigbee device availability + def _update_zigbee_availability(self, entity: GwEntityData) -> None: + """Update zigbee device availability status.""" if "module_id" in entity: module_id = entity["module_id"] locator = f'./module[@id="{module_id}"]/protocols/zig_bee_node' From 66320668d724d8184bb74fd3173bf672e38fde8f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 25 Dec 2025 13:37:14 +0100 Subject: [PATCH 77/77] Bump to a4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1bf5a8ef..6e3d731b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.12.0a3" +version = "1.12.0a4" license = "MIT" description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md"