From e86624c75a7c3b540f5173aa032407dec61a4ab9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 8 Sep 2024 16:13:54 +0200 Subject: [PATCH 01/50] Implement model_id --- plugwise/common.py | 8 +++++--- plugwise/helper.py | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index a63049d0c..e3c90db35 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -85,8 +85,8 @@ def _appl_heater_central_info( module_data = self._get_module_data(xml_1, locator_2, mod_type, xml_3) appl.vendor_name = module_data["vendor_name"] appl.hardware = module_data["hardware_version"] - appl.model = module_data["vendor_model"] - if appl.model is None: + appl.model_id = module_data["vendor_model"] + if appl.model_id is None: appl.model = ( "Generic heater/cooler" if self._cooling_present @@ -102,7 +102,8 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) xml_2 = return_valid(xml_2, self._domain_objects) module_data = self._get_module_data(xml_1, locator, mod_type, xml_2) appl.vendor_name = module_data["vendor_name"] - appl.model = check_model(module_data["vendor_model"], appl.vendor_name) + appl.model_id = module_data["vendor_model"] + appl.model = check_model(appl.model_id, appl.vendor_name) appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] appl.zigbee_mac = module_data["zigbee_mac_address"] @@ -197,6 +198,7 @@ def _create_gw_devices(self, appl: Munch) -> None: "location": appl.location, "mac_address": appl.mac, "model": appl.model, + "model_id": appl.model_id, "name": appl.name, "zigbee_mac_address": appl.zigbee_mac, "vendor": appl.vendor_name, diff --git a/plugwise/helper.py b/plugwise/helper.py index b772a770c..17fe31c1f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -286,6 +286,7 @@ def _all_appliances(self) -> None: appl.dev_id = appliance.attrib["id"] appl.name = appliance.find("name").text appl.model = appl.pwclass.replace("_", " ").title() + appl.model_id = None appl.firmware = None appl.hardware = None appl.mac = None @@ -387,7 +388,7 @@ def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch: mod_type = "electricity_point_meter" module_data = self._get_module_data(appliance, locator, mod_type) appl.hardware = module_data["hardware_version"] - appl.model = module_data["vendor_model"] + appl.model_id = module_data["vendor_model"] appl.vendor_name = module_data["vendor_name"] appl.firmware = module_data["firmware_version"] @@ -403,7 +404,8 @@ def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch: return None appl.vendor_name = module_data["vendor_name"] - appl.model = check_model(module_data["vendor_model"], appl.vendor_name) + appl.model_id = module_data["vendor_model"] + appl.model = check_model(appl.model_id, appl.vendor_name) appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] @@ -418,6 +420,7 @@ def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch: appl.hardware = self.smile_hw_version appl.mac = self.smile_mac_address appl.model = self.smile_model + appl.model_id = self._domain_objects.find("./gateway/vendor_mode").text appl.name = self.smile_name appl.vendor_name = "Plugwise" From f6584044be5c624ca079b6c658c41825465ddcd8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 8 Sep 2024 16:14:54 +0200 Subject: [PATCH 02/50] Full test-output --- scripts/tests_and_coverage.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tests_and_coverage.sh b/scripts/tests_and_coverage.sh index b8dd17c9e..2e4a45336 100755 --- a/scripts/tests_and_coverage.sh +++ b/scripts/tests_and_coverage.sh @@ -31,7 +31,8 @@ set +u if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "test_and_coverage" ] ; then # Python tests (rerun with debug if failures) - PYTHONPATH=$(pwd) pytest -qx tests/ --cov='.' --no-cov-on-fail --cov-report term-missing || PYTHONPATH=$(pwd) pytest -xrpP --log-level debug tests/ + # PYTHONPATH=$(pwd) pytest -qx tests/ --cov='.' --no-cov-on-fail --cov-report term-missing || + PYTHONPATH=$(pwd) pytest -xrpP --log-level debug tests/ fi if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "linting" ] ; then From 4e5a9fa73740b570726c0efc85bfe3022b9fd35e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 8 Sep 2024 16:15:56 +0200 Subject: [PATCH 03/50] Fix typo --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 17fe31c1f..c0bbf6482 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -420,7 +420,7 @@ def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch: appl.hardware = self.smile_hw_version appl.mac = self.smile_mac_address appl.model = self.smile_model - appl.model_id = self._domain_objects.find("./gateway/vendor_mode").text + appl.model_id = self._domain_objects.find("./gateway/vendor_model").text appl.name = self.smile_name appl.vendor_name = "Plugwise" From 6309dde467ec34d9fe70234e00f16d313adff304 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 8 Sep 2024 20:08:01 +0200 Subject: [PATCH 04/50] Improvements --- plugwise/common.py | 1 + plugwise/helper.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index e3c90db35..a8766f378 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -251,6 +251,7 @@ def _get_group_switches(self) -> dict[str, DeviceData]: "dev_class": group_type, "model": "Switchgroup", "name": group_name, + "model_id": None, "members": members, }, }, diff --git a/plugwise/helper.py b/plugwise/helper.py index c0bbf6482..7b7730297 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -285,7 +285,7 @@ def _all_appliances(self) -> None: appl.dev_id = appliance.attrib["id"] appl.name = appliance.find("name").text - appl.model = appl.pwclass.replace("_", " ").title() + appl.model = None appl.model_id = None appl.firmware = None appl.hardware = None @@ -351,7 +351,7 @@ def _p1_smartmeter_info_finder(self, appl: Munch) -> None: appl.dev_id = self.gateway_id appl.location = loc_id appl.mac = None - appl.model = self.smile_model + appl.model = self._domain_objects.find("./gateway/vendor_model").text appl.name = "P1" appl.pwclass = "smartmeter" appl.zigbee_mac = None From 85c92f48c6f68df78a67756d74b1b05246283e9a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 8 Sep 2024 20:16:17 +0200 Subject: [PATCH 05/50] Improve modelname for Aqara Smartplugs --- plugwise/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugwise/util.py b/plugwise/util.py index 955d57c51..79b52c76b 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -110,6 +110,9 @@ def check_model(name: str | None, vendor_name: str | None) -> str | None: if vendor_name == "Plugwise" and ((model := version_to_model(name)) != "Unknown"): return model + if "lumi.plug" in name: + return "Aqara Smart Plug" + return name From 76fe3ae51f93251dd2fbc6b462ad4b9361b9af6e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 08:31:59 +0200 Subject: [PATCH 06/50] Update adam_plus_anna_new test-json --- tests/data/adam/adam_plus_anna_new.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index 724a0b937..234dbc689 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -48,7 +48,7 @@ "67d73d0bd469422db25a618a5fb8eeb0": { "dev_class": "zz_misc", "location": "b4f211175e124df59603412bafa77a34", - "model": "lumi.plug.maeu01", + "model": "Aqara Smart Plug", "name": "SmartPlug Floor 0", "zigbee_mac_address": "54EF4410002C97F2", "vendor": "LUMI", From ede3b4de9c42e41f6878bfac55978778da31dd06 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 08:33:25 +0200 Subject: [PATCH 07/50] Update device-items assert --- tests/test_adam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index 34e2f57c0..cef88b498 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -36,7 +36,7 @@ async def test_connect_adam_plus_anna_new(self): assert smile.gateway_id == "da224107914542988a88561b4452b0f6" assert smile._last_active["f2bf9048bef64cc5b6d5110154e33c81"] == "Weekschema" assert smile._last_active["f871b8c4d63549319221e294e4f88074"] == "Badkamer" - assert self.device_items == 149 + assert self.device_items == 157 assert self.device_list == [ "da224107914542988a88561b4452b0f6", "056ee145a816487eaa69243c3280f8bf", @@ -186,7 +186,7 @@ async def test_connect_adam_zone_per_device(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.device_items == 323 + assert self.device_items == 340 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications await smile.delete_notification() @@ -264,7 +264,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.device_items == 323 + assert self.device_items == 340 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications From f584bd364e05c8f24e54f8a3884dd254c9ae3a1f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 08:47:51 +0200 Subject: [PATCH 08/50] Improve model-naming for heater_central --- plugwise/common.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index a8766f378..a01f77150 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -68,8 +68,8 @@ def _appl_heater_central_info( # Info for On-Off device if self._on_off_device: appl.name = "OnOff" # pragma: no cover - appl.vendor_name = None # pragma: no cover appl.model = "Unknown" # pragma: no cover + appl.vendor_name = None # pragma: no cover return appl # pragma: no cover # Info for OpenTherm device @@ -86,12 +86,11 @@ def _appl_heater_central_info( appl.vendor_name = module_data["vendor_name"] appl.hardware = module_data["hardware_version"] appl.model_id = module_data["vendor_model"] - if appl.model_id is None: - appl.model = ( - "Generic heater/cooler" - if self._cooling_present - else "Generic heater" - ) + appl.model = ( + "Generic heater/cooler" + if self._cooling_present + else "Generic heater" + ) return appl From 2dad241c18d46de5306baec3884245912013080c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 08:52:24 +0200 Subject: [PATCH 09/50] Update adam_heatpump_cooling test-json --- tests/data/adam/adam_heatpump_cooling.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/adam/adam_heatpump_cooling.json b/tests/data/adam/adam_heatpump_cooling.json index 7cac31cbc..185a92bcc 100644 --- a/tests/data/adam/adam_heatpump_cooling.json +++ b/tests/data/adam/adam_heatpump_cooling.json @@ -21,7 +21,8 @@ "setpoint": 35, "upper_bound": 50 }, - "model": "17.1", + "model": "Generic heater/cooler", + "model_id": "17.1", "name": "OpenTherm", "sensors": { "dhw_temperature": 63.5, From 26eb7bbfcdc151ca319e14ef5b50fbcf7b5ba764 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 08:53:36 +0200 Subject: [PATCH 10/50] Update device_items assert --- tests/test_adam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index cef88b498..03a26fd91 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -302,7 +302,7 @@ async def test_adam_heatpump_cooling(self): assert smile._last_active["a562019b0b1f47a4bde8ebe3dbe3e8a9"] == WERKDAG_SCHEMA assert smile._last_active["8cf650a4c10c44819e426bed406aec34"] == WERKDAG_SCHEMA assert smile._last_active["5cc21042f87f4b4c94ccb5537c47a53f"] == WERKDAG_SCHEMA - assert self.device_items == 417 + assert self.device_items == 439 await smile.close_connection() await self.disconnect(server, client) @@ -323,7 +323,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): ) await self.device_test(smile, "2022-01-02 00:00:01", testdata) - assert self.device_items == 56 + assert self.device_items == 58 assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -348,7 +348,7 @@ async def test_connect_adam_plus_anna(self): await self.device_test(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "b128b4bbbd1f47e9bf4d756e8fb5ee94" assert smile._last_active["009490cc2f674ce6b576863fbb64f867"] == "Weekschema" - assert self.device_items == 70 + assert self.device_items == 73 assert "6fb89e35caeb4b1cb275184895202d84" in self.notifications result = await self.tinker_thermostat( From 06b8983e9fe1a586f69d6c10528a540479e40421 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:39:33 +0200 Subject: [PATCH 11/50] Add protection --- plugwise/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/util.py b/plugwise/util.py index 79b52c76b..60feaa143 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -110,7 +110,7 @@ def check_model(name: str | None, vendor_name: str | None) -> str | None: if vendor_name == "Plugwise" and ((model := version_to_model(name)) != "Unknown"): return model - if "lumi.plug" in name: + if name is not None and "lumi.plug" in name: return "Aqara Smart Plug" return name From ebb699be583b3d0540c73615b4bdfc7b09b5080e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:41:39 +0200 Subject: [PATCH 12/50] Update adam_jip test-json --- tests/data/adam/adam_jip.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/data/adam/adam_jip.json b/tests/data/adam/adam_jip.json index f2905fe97..3976eef80 100644 --- a/tests/data/adam/adam_jip.json +++ b/tests/data/adam/adam_jip.json @@ -2,7 +2,8 @@ "e4684553153b44afbef2200885f379dc": { "dev_class": "heater_central", "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "10.20", + "model": "Generic heater", + "model_id": "10.20", "name": "OpenTherm", "vendor": "Remeha B.V.", "maximum_boiler_temperature": { @@ -231,7 +232,8 @@ "457ce8414de24596a2d5e7dbc9c7682f": { "dev_class": "zz_misc", "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "lumi.plug.maeu01", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", "name": "Plug", "zigbee_mac_address": "ABCD012345670A06", "vendor": "LUMI", From 2634bd52611451555361fe253b2330cb3df58f33 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:44:17 +0200 Subject: [PATCH 13/50] Update device_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 03a26fd91..4c2e812ff 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -392,7 +392,7 @@ async def test_adam_plus_jip(self): assert smile._last_active["06aecb3d00354375924f50c47af36bd2"] is None assert smile._last_active["d27aede973b54be484f6842d1b2802ad"] is None assert smile._last_active["13228dab8ce04617af318a2888b3c548"] is None - assert self.device_items == 217 + assert self.device_items == 228 # Negative test result = await self.tinker_thermostat( From 8774c5cccd436c00f2d1f7ccf03ef79751287c38 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:45:58 +0200 Subject: [PATCH 14/50] Update anna_v4 test-json --- tests/data/anna/anna_v4.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/anna_v4.json b/tests/data/anna/anna_v4.json index 23ff33fb7..03204c368 100644 --- a/tests/data/anna/anna_v4.json +++ b/tests/data/anna/anna_v4.json @@ -2,7 +2,8 @@ "cd0e6156b1f04d5f952349ffbe397481": { "dev_class": "heater_central", "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "model": "2.32", + "model": "Generic heater", + "model_id": "2.32", "name": "OpenTherm", "vendor": "Bosch Thermotechniek B.V.", "maximum_boiler_temperature": { From e8fbb205f3ad5623f2bf785f9de3ecb7fa1bb22b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:47:15 +0200 Subject: [PATCH 15/50] Update device_items asserts --- tests/test_anna.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index a05cd48a2..5067d62e7 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -30,7 +30,7 @@ async def test_connect_anna_v4(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile.gateway_id == "0466eae8520144c78afb29628384edeb" assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.device_items == 56 + assert self.device_items == 59 assert not self.notifications assert not self.cooling_present @@ -105,7 +105,7 @@ async def test_connect_anna_v4_dhw(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.device_items == 56 + assert self.device_items == 59 assert not self.notifications result = await self.tinker_thermostat( @@ -138,7 +138,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(smile, "2020-04-05 00:00:01", testdata) - assert self.device_items == 56 + assert self.device_items == 59 result = await self.tinker_thermostat( smile, From 6091373ea39286dec65a4d9632ec874f2a3acd91 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:48:30 +0200 Subject: [PATCH 16/50] Update anna_v4_dhw test-json --- tests/data/anna/anna_v4_dhw.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/anna_v4_dhw.json b/tests/data/anna/anna_v4_dhw.json index 15ac115c3..a6930268f 100644 --- a/tests/data/anna/anna_v4_dhw.json +++ b/tests/data/anna/anna_v4_dhw.json @@ -2,7 +2,8 @@ "cd0e6156b1f04d5f952349ffbe397481": { "dev_class": "heater_central", "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "model": "2.32", + "model": "Generic heater", + "model_id": "2.32", "name": "OpenTherm", "vendor": "Bosch Thermotechniek B.V.", "maximum_boiler_temperature": { From f7f991aa17e5382ec339e29af2736553098d0099 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:49:46 +0200 Subject: [PATCH 17/50] Update device_items assert --- tests/test_anna.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index 5067d62e7..71ceab02a 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -167,7 +167,7 @@ async def test_connect_anna_without_boiler_fw441(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["c34c6864216446528e95d88985e714cc"] == "Normaal" - assert self.device_items == 38 + assert self.device_items == 40 assert not self.notifications result = await self.tinker_thermostat( @@ -196,7 +196,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 66 + assert self.device_items == 68 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -225,7 +225,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( smile, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.device_items == 63 + assert self.device_items == 65 await smile.close_connection() await self.disconnect(server, client) @@ -251,7 +251,7 @@ async def test_connect_anna_heatpump_cooling(self): await self.device_test(smile, "2020-04-19 00:00:01", testdata) assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 63 + assert self.device_items == 65 assert self.cooling_present assert not self.notifications @@ -296,7 +296,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(smile, "2020-04-19 00:00:01", testdata) - assert self.device_items == 63 + assert self.device_items == 65 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -323,7 +323,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 62 + assert self.device_items == 64 assert not self.notifications assert not self.cooling_present @@ -350,7 +350,7 @@ async def test_connect_anna_elga_2(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.device_items == 62 + assert self.device_items == 64 assert smile.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -375,7 +375,7 @@ async def test_connect_anna_elga_2_schedule_off(self): ) assert self.cooling_present assert not self._cooling_enabled - assert self.device_items == 62 + assert self.device_items == 64 await smile.close_connection() await self.disconnect(server, client) @@ -404,7 +404,7 @@ async def test_connect_anna_elga_2_cooling(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.device_items == 62 + assert self.device_items == 64 assert not self.notifications assert self.cooling_present @@ -431,7 +431,7 @@ async def test_connect_anna_loria_heating_idle(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 64 + assert self.device_items == 66 assert self.cooling_present assert not self._cooling_enabled @@ -497,7 +497,7 @@ async def test_connect_anna_loria_cooling_active(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 64 + assert self.device_items == 66 assert self.cooling_present assert self._cooling_enabled @@ -520,7 +520,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(smile, "2022-05-16 00:00:01", testdata) - assert self.device_items == 64 + assert self.device_items == 66 assert self.cooling_present assert not self._cooling_enabled From 0a989102261e331de8f276cdea74b5db0eba7229 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:55:35 +0200 Subject: [PATCH 18/50] Update anna_loria_heating_idle --- tests/data/anna/anna_loria_heating_idle.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/anna_loria_heating_idle.json b/tests/data/anna/anna_loria_heating_idle.json index c6027d3ac..80315992d 100644 --- a/tests/data/anna/anna_loria_heating_idle.json +++ b/tests/data/anna/anna_loria_heating_idle.json @@ -29,7 +29,8 @@ "bfb5ee0a88e14e5f97bfa725a760cc49": { "dev_class": "heater_central", "location": "674b657c138a41a291d315d7471deb06", - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "vendor": "Atlantic", "select_dhw_mode": "auto", From 3f483482daec9f81228d143c895e665784a5bf6c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:56:55 +0200 Subject: [PATCH 19/50] Update device_items assert --- tests/test_anna.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index 71ceab02a..c82bf3464 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -431,7 +431,7 @@ async def test_connect_anna_loria_heating_idle(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 66 + assert self.device_items == 67 assert self.cooling_present assert not self._cooling_enabled @@ -497,7 +497,7 @@ async def test_connect_anna_loria_cooling_active(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 66 + assert self.device_items == 67 assert self.cooling_present assert self._cooling_enabled From 9f967d48c7d06d8408ea0c49c27ab0c3b8de8658 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 17:58:18 +0200 Subject: [PATCH 20/50] Update anna_loria_cooling_active test-json --- tests/data/anna/anna_loria_cooling_active.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/anna_loria_cooling_active.json b/tests/data/anna/anna_loria_cooling_active.json index e15b4084c..36aa3a5e8 100644 --- a/tests/data/anna/anna_loria_cooling_active.json +++ b/tests/data/anna/anna_loria_cooling_active.json @@ -29,7 +29,8 @@ "bfb5ee0a88e14e5f97bfa725a760cc49": { "dev_class": "heater_central", "location": "674b657c138a41a291d315d7471deb06", - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "vendor": "Atlantic", "select_dhw_mode": "auto", From 3742ba51b6bf88785929f3e484a0ff4fbe14996f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:00:11 +0200 Subject: [PATCH 21/50] Update anna_loria_driessens test-json --- tests/data/anna/anna_loria_driessens.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/anna_loria_driessens.json b/tests/data/anna/anna_loria_driessens.json index f26c59e7c..0bd6a141a 100644 --- a/tests/data/anna/anna_loria_driessens.json +++ b/tests/data/anna/anna_loria_driessens.json @@ -78,7 +78,8 @@ "setpoint": 45, "upper_bound": 45 }, - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { From abb14c1b647a08fba96f33345937590711d7cf32 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:01:02 +0200 Subject: [PATCH 22/50] Update device_items 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 c82bf3464..7469a60d0 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -520,7 +520,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(smile, "2022-05-16 00:00:01", testdata) - assert self.device_items == 66 + assert self.device_items == 67 assert self.cooling_present assert not self._cooling_enabled From cf62732f61aee49c8cc94a3bfa444eacd778616e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:02:58 +0200 Subject: [PATCH 23/50] Update legacy_anna test-json --- tests/data/anna/legacy_anna.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/anna/legacy_anna.json b/tests/data/anna/legacy_anna.json index ac3655153..f8db5aec1 100644 --- a/tests/data/anna/legacy_anna.json +++ b/tests/data/anna/legacy_anna.json @@ -34,7 +34,8 @@ "04e4cbfe7f4340f090f85ec3b9e6a950": { "dev_class": "heater_central", "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "4.21", + "model": "Generic heater", + "model_id": "4.21", "name": "OpenTherm", "vendor": "Bosch Thermotechniek B.V.", "maximum_boiler_temperature": { From 0594a03c701701c20b2f295b8774c2a11255264d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:03:54 +0200 Subject: [PATCH 24/50] Update devuce_items test-assert --- tests/test_legacy_anna.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 2475aff83..51fb107a5 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(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.device_items == 41 + assert self.device_items == 43 result = await self.tinker_legacy_thermostat(smile, schedule_on=False) assert result From 69eafebd1183bea7d5129b30ce3ca38b15232719 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:12:27 +0200 Subject: [PATCH 25/50] Avoid double model/model_id's for Anna --- plugwise/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index a01f77150..f7123d0f2 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -101,8 +101,11 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) xml_2 = return_valid(xml_2, self._domain_objects) module_data = self._get_module_data(xml_1, locator, mod_type, xml_2) appl.vendor_name = module_data["vendor_name"] - appl.model_id = module_data["vendor_model"] - appl.model = check_model(appl.model_id, appl.vendor_name) + if (model := module_data["vendor_model"]) == "ThermoTouch": + appl.model = model + else: + appl.model_id = model + appl.model = check_model(model, appl.vendor_name) appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] appl.zigbee_mac = module_data["zigbee_mac_address"] From 99f6e3ead6745dee50f24291d3504c8644010440 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 18:15:44 +0200 Subject: [PATCH 26/50] Correct device_items asserts --- tests/test_anna.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_anna.py b/tests/test_anna.py index 7469a60d0..e260f95e0 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -30,7 +30,7 @@ async def test_connect_anna_v4(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile.gateway_id == "0466eae8520144c78afb29628384edeb" assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.device_items == 59 + assert self.device_items == 58 assert not self.notifications assert not self.cooling_present @@ -105,7 +105,7 @@ async def test_connect_anna_v4_dhw(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.device_items == 59 + assert self.device_items == 58 assert not self.notifications result = await self.tinker_thermostat( @@ -138,7 +138,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(smile, "2020-04-05 00:00:01", testdata) - assert self.device_items == 59 + assert self.device_items == 58 result = await self.tinker_thermostat( smile, @@ -167,7 +167,7 @@ async def test_connect_anna_without_boiler_fw441(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["c34c6864216446528e95d88985e714cc"] == "Normaal" - assert self.device_items == 40 + assert self.device_items == 39 assert not self.notifications result = await self.tinker_thermostat( @@ -196,7 +196,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 68 + assert self.device_items == 67 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -225,7 +225,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( smile, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.device_items == 65 + assert self.device_items == 64 await smile.close_connection() await self.disconnect(server, client) @@ -251,7 +251,7 @@ async def test_connect_anna_heatpump_cooling(self): await self.device_test(smile, "2020-04-19 00:00:01", testdata) assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 65 + assert self.device_items == 64 assert self.cooling_present assert not self.notifications @@ -296,7 +296,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(smile, "2020-04-19 00:00:01", testdata) - assert self.device_items == 65 + assert self.device_items == 64 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -323,7 +323,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.device_items == 64 + assert self.device_items == 63 assert not self.notifications assert not self.cooling_present @@ -350,7 +350,7 @@ async def test_connect_anna_elga_2(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.device_items == 64 + assert self.device_items == 63 assert smile.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -375,7 +375,7 @@ async def test_connect_anna_elga_2_schedule_off(self): ) assert self.cooling_present assert not self._cooling_enabled - assert self.device_items == 64 + assert self.device_items == 63 await smile.close_connection() await self.disconnect(server, client) @@ -404,7 +404,7 @@ async def test_connect_anna_elga_2_cooling(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.device_items == 64 + assert self.device_items == 63 assert not self.notifications assert self.cooling_present @@ -431,7 +431,7 @@ async def test_connect_anna_loria_heating_idle(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 67 + assert self.device_items == 66 assert self.cooling_present assert not self._cooling_enabled @@ -497,7 +497,7 @@ async def test_connect_anna_loria_cooling_active(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.device_items == 67 + assert self.device_items == 66 assert self.cooling_present assert self._cooling_enabled @@ -520,7 +520,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(smile, "2022-05-16 00:00:01", testdata) - assert self.device_items == 67 + assert self.device_items == 66 assert self.cooling_present assert not self._cooling_enabled From fb7f11f035ae882b5ab85bcf8a027357051ed8a7 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:00:43 +0200 Subject: [PATCH 27/50] Define appl.model_id for legacy appliances --- plugwise/legacy/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 862a1c3fb..41bbf0f88 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -117,6 +117,7 @@ def _all_appliances(self) -> None: appl.dev_id = appliance.attrib["id"] appl.name = appliance.find("name").text appl.model = appl.pwclass.replace("_", " ").title() + appl.model_id = None appl.firmware = None appl.hardware = None appl.mac = None From 39e02049f7e8ad458cbec159eee4762c0d6f944d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:01:57 +0200 Subject: [PATCH 28/50] Correct device_items assert --- tests/test_legacy_anna.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 51fb107a5..5f1a28ca7 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(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.device_items == 43 + assert self.device_items == 42 result = await self.tinker_legacy_thermostat(smile, schedule_on=False) assert result From 478614a54bca1ca942572f141a3ba2eab49dc2b9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:05:00 +0200 Subject: [PATCH 29/50] Define appl.model_id for P1 --- plugwise/helper.py | 1 + plugwise/legacy/helper.py | 1 + 2 files changed, 2 insertions(+) diff --git a/plugwise/helper.py b/plugwise/helper.py index 7b7730297..d384eee3e 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -352,6 +352,7 @@ def _p1_smartmeter_info_finder(self, appl: Munch) -> None: appl.location = loc_id appl.mac = None appl.model = self._domain_objects.find("./gateway/vendor_model").text + appl.model_id = None appl.name = "P1" appl.pwclass = "smartmeter" appl.zigbee_mac = None diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 41bbf0f88..b32176b01 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -247,6 +247,7 @@ def _p1_smartmeter_info_finder(self, appl: Munch) -> None: appl.location = loc_id appl.mac = None appl.model = self.smile_model + appl.model_id = None appl.name = "P1" appl.pwclass = "smartmeter" appl.zigbee_mac = None From 0d588dcb52d8ec7b7f01447aedfa32f39f7ab13a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:14:19 +0200 Subject: [PATCH 30/50] Don't use model_id for Smartmeter --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index d384eee3e..ddb13c685 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -389,7 +389,7 @@ def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch: mod_type = "electricity_point_meter" module_data = self._get_module_data(appliance, locator, mod_type) appl.hardware = module_data["hardware_version"] - appl.model_id = module_data["vendor_model"] + appl.model = module_data["vendor_model"] # don't use model_id for P1 appl.vendor_name = module_data["vendor_name"] appl.firmware = module_data["firmware_version"] From 2f3a8bfcbbaeb33c7c7eefa7620b1a63279ccdd3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:15:57 +0200 Subject: [PATCH 31/50] Update device_item asserts --- tests/test_p1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_p1.py b/tests/test_p1.py index 39114aebc..4bec2f54b 100644 --- a/tests/test_p1.py +++ b/tests/test_p1.py @@ -28,7 +28,7 @@ async def test_connect_p1v4(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile.gateway_id == "a455b61e52394b2db5081ce025a430f3" - assert self.device_items == 29 + assert self.device_items == 30 assert "97a04c0c263049b29350a660b4cdd01e" in self.notifications await smile.close_connection() @@ -52,7 +52,7 @@ async def test_connect_p1v4_442_single(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile.gateway_id == "a455b61e52394b2db5081ce025a430f3" - assert self.device_items == 31 + assert self.device_items == 32 assert not self.notifications # Now change some data and change directory reading xml from @@ -86,7 +86,7 @@ async def test_connect_p1v4_442_triple(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile.gateway_id == "03e65b16e4b247a29ae0d75a78cb492e" - assert self.device_items == 40 + assert self.device_items == 41 assert self.notifications await smile.close_connection() From 821d1227d51002cc750c18f8146b470bfc401207 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:18:14 +0200 Subject: [PATCH 32/50] Remove model_if from Switchgroup, not needed --- plugwise/common.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/common.py b/plugwise/common.py index f7123d0f2..ac222731c 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -253,7 +253,6 @@ def _get_group_switches(self) -> dict[str, DeviceData]: "dev_class": group_type, "model": "Switchgroup", "name": group_name, - "model_id": None, "members": members, }, }, From d53b425d11e153333e5655a3f55a3274b59410b3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:19:03 +0200 Subject: [PATCH 33/50] Save updated fixtures --- fixtures/adam_heatpump_cooling/all_data.json | 26 +++++++++++++++++-- fixtures/adam_jip/all_data.json | 17 +++++++++--- .../all_data.json | 19 +++++++++++++- .../all_data.json | 4 ++- fixtures/adam_plus_anna/all_data.json | 5 +++- fixtures/adam_plus_anna_new/all_data.json | 12 +++++++-- fixtures/adam_zone_per_device/all_data.json | 19 +++++++++++++- fixtures/anna_elga_2/all_data.json | 3 ++- fixtures/anna_elga_2_cooling/all_data.json | 3 ++- .../anna_elga_2_schedule_off/all_data.json | 3 ++- fixtures/anna_elga_no_cooling/all_data.json | 3 ++- fixtures/anna_heatpump_cooling/all_data.json | 3 ++- .../all_data.json | 3 ++- fixtures/anna_heatpump_heating/all_data.json | 3 ++- .../anna_loria_cooling_active/all_data.json | 6 +++-- fixtures/anna_loria_driessens/all_data.json | 6 +++-- .../anna_loria_heating_idle/all_data.json | 6 +++-- fixtures/anna_v4/all_data.json | 6 +++-- fixtures/anna_v4_dhw/all_data.json | 6 +++-- fixtures/anna_v4_no_tag/all_data.json | 6 +++-- .../anna_without_boiler_fw441/all_data.json | 3 ++- fixtures/legacy_anna/all_data.json | 5 ++-- fixtures/m_adam_cooling/all_data.json | 6 ++++- fixtures/m_adam_heating/all_data.json | 6 ++++- fixtures/m_adam_jip/all_data.json | 17 +++++++++--- .../all_data.json | 19 +++++++++++++- .../m_anna_heatpump_cooling/all_data.json | 3 ++- fixtures/m_anna_heatpump_idle/all_data.json | 3 ++- fixtures/p1v4/all_data.json | 3 ++- fixtures/p1v4_442_single/all_data.json | 3 ++- fixtures/p1v4_442_triple/all_data.json | 3 ++- 31 files changed, 186 insertions(+), 44 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/all_data.json b/fixtures/adam_heatpump_cooling/all_data.json index ea67d51bb..60c8472a4 100644 --- a/fixtures/adam_heatpump_cooling/all_data.json +++ b/fixtures/adam_heatpump_cooling/all_data.json @@ -22,7 +22,8 @@ "setpoint": 35.0, "upper_bound": 50.0 }, - "model": "17.1", + "model": "Generic heater/cooler", + "model_id": "17.1", "name": "OpenTherm", "sensors": { "dhw_temperature": 63.5, @@ -57,6 +58,7 @@ "location": "b52908550469425b812c87f766fe5303", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat BK", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -86,6 +88,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "20e735858f8146cead98b873177a4f99", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug DB", "sensors": { "electricity_consumed": 0.0, @@ -105,6 +108,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug KK", "sensors": { "electricity_consumed": 2.13, @@ -124,6 +128,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "04b15f6e884448288f811d29fb7b1b30", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug SJ", "sensors": { "electricity_consumed": 0.0, @@ -143,6 +148,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "fa5fa6b34f6b40a0972988b20e888ed4", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug WK", "sensors": { "electricity_consumed": 0.0, @@ -172,6 +178,7 @@ "location": "20e735858f8146cead98b873177a4f99", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat DB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -200,6 +207,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "9a27714b970547ee9a6bdadc2b815ad5", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug SQ", "sensors": { "electricity_consumed": 0.0, @@ -224,6 +232,7 @@ "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": [ "heating", @@ -256,6 +265,7 @@ "location": "e39529c79ab54fda9bed26cfc0447546", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat JM", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -284,6 +294,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "b52908550469425b812c87f766fe5303", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug BK", "sensors": { "electricity_consumed": 0.0, @@ -303,6 +314,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "5cc21042f87f4b4c94ccb5537c47a53f", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug BK2", "sensors": { "electricity_consumed": 0.0, @@ -322,6 +334,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "e39529c79ab54fda9bed26cfc0447546", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug JM", "sensors": { "electricity_consumed": 0.0, @@ -341,6 +354,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug RB", "sensors": { "electricity_consumed": 3.13, @@ -360,6 +374,7 @@ "firmware": "2020-05-13T02:00:00+02:00", "location": "8cf650a4c10c44819e426bed406aec34", "model": "Plug", + "model_id": "160-01", "name": "Smart Plug BK1", "sensors": { "electricity_consumed": 0.0, @@ -389,6 +404,7 @@ "location": "9a27714b970547ee9a6bdadc2b815ad5", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat SQ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -427,6 +443,7 @@ "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat RB", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -462,6 +479,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "mode": "auto", "model": "ThermoTouch", + "model_id": "143.1", "name": "Thermostaat WK", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", @@ -493,6 +511,7 @@ "location": "04b15f6e884448288f811d29fb7b1b30", "mode": "cool", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat SJ", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "off", @@ -534,6 +553,7 @@ "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat KK", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", @@ -573,6 +593,7 @@ "location": "8cf650a4c10c44819e426bed406aec34", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat BK1", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", @@ -611,6 +632,7 @@ "location": "5cc21042f87f4b4c94ccb5537c47a53f", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Thermostaat BK2", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", @@ -638,7 +660,7 @@ "cooling_present": true, "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 417, + "item_count": 439, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_jip/all_data.json b/fixtures/adam_jip/all_data.json index a4a4c327c..bb0f73481 100644 --- a/fixtures/adam_jip/all_data.json +++ b/fixtures/adam_jip/all_data.json @@ -13,6 +13,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -42,6 +43,7 @@ "hardware": "1", "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Logeerkamer", "sensors": { "setpoint": 13.0, @@ -65,6 +67,7 @@ "hardware": "1", "location": "06aecb3d00354375924f50c47af36bd2", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Slaapkamer", "sensors": { "setpoint": 13.0, @@ -85,7 +88,8 @@ "available": true, "dev_class": "zz_misc", "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "lumi.plug.maeu01", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", "name": "Plug", "sensors": { "electricity_consumed_interval": 0.0 @@ -110,6 +114,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -139,6 +144,7 @@ "hardware": "1", "location": "13228dab8ce04617af318a2888b3c548", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Woonkamer", "sensors": { "setpoint": 9.0, @@ -168,6 +174,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -201,6 +208,7 @@ "location": "9e4433a9d69f40b3aefd15e74395eaec", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "select_gateway_mode": "full", @@ -218,6 +226,7 @@ "hardware": "1", "location": "d27aede973b54be484f6842d1b2802ad", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Kinderkamer", "sensors": { "setpoint": 13.0, @@ -255,7 +264,8 @@ "setpoint": 90.0, "upper_bound": 90.0 }, - "model": "10.20", + "model": "Generic heater", + "model_id": "10.20", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -282,6 +292,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "mode": "heat", "model": "Jip", + "model_id": "168-01", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -310,7 +321,7 @@ "cooling_present": false, "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 217, + "item_count": 228, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_multiple_devices_per_zone/all_data.json b/fixtures/adam_multiple_devices_per_zone/all_data.json index 44898f112..374c75ee3 100644 --- a/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -6,6 +6,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -26,6 +27,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 84.1, @@ -46,6 +48,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -66,6 +69,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -90,6 +94,7 @@ "hardware": "1", "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Badkamer", "sensors": { "battery": 51, @@ -127,6 +132,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Jessie", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "CV Jessie", @@ -156,6 +162,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", + "model_id": "160-01", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.6, @@ -189,6 +196,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -213,6 +221,7 @@ "hardware": "1", "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", + "model_id": "106-03", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -237,6 +246,7 @@ "hardware": "1", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", + "model_id": "106-03", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -273,6 +283,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa WK", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "GF7 Woonkamer", @@ -302,6 +313,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -326,6 +338,7 @@ "hardware": "1", "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -363,6 +376,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa Bios", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", @@ -406,6 +420,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "mode": "heat", "model": "Tom/Floor", + "model_id": "106-03", "name": "CV Kraan Garage", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", @@ -451,6 +466,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Badkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Badkamer Schema", @@ -484,6 +500,7 @@ "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "select_regulation_mode": "heating", "sensors": { @@ -497,7 +514,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 323, + "item_count": 340, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json index 2bd8d44c4..c9893ceee 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json @@ -47,6 +47,7 @@ "location": "eedadcb297564f1483faa509179aebed", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": [ "heating", @@ -76,6 +77,7 @@ "location": "fa5fa6b34f6b40a0972988b20e888ed4", "mode": "auto", "model": "ThermoTouch", + "model_id": "143.1", "name": "Thermostaat WK", "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], "select_schedule": "Werkdag schema", @@ -96,7 +98,7 @@ "cooling_present": true, "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 56, + "item_count": 58, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_plus_anna/all_data.json b/fixtures/adam_plus_anna/all_data.json index 85f562fbd..3af34a6a3 100644 --- a/fixtures/adam_plus_anna/all_data.json +++ b/fixtures/adam_plus_anna/all_data.json @@ -31,6 +31,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "45d410adf8fd461e85cebf16d5ead542", "model": "Plug", + "model_id": "160-01", "name": "MediaCenter", "sensors": { "electricity_consumed": 10.3, @@ -55,6 +56,7 @@ "location": "07d618f0bb80412687f065b8698ce3e7", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "select_regulation_mode": "heating", "sensors": { @@ -70,6 +72,7 @@ "location": "009490cc2f674ce6b576863fbb64f867", "mode": "auto", "model": "ThermoTouch", + "model_id": "143.1", "name": "Anna", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Weekschema", @@ -109,7 +112,7 @@ "cooling_present": false, "gateway_id": "b128b4bbbd1f47e9bf4d756e8fb5ee94", "heater_id": "2743216f626f43948deec1f7ab3b3d70", - "item_count": 70, + "item_count": 73, "notifications": { "6fb89e35caeb4b1cb275184895202d84": { "error": "There is no OpenTherm communication with the boiler." diff --git a/fixtures/adam_plus_anna_new/all_data.json b/fixtures/adam_plus_anna_new/all_data.json index b9f4e9e9c..52a6cbcc4 100644 --- a/fixtures/adam_plus_anna_new/all_data.json +++ b/fixtures/adam_plus_anna_new/all_data.json @@ -35,6 +35,7 @@ "hardware": "1", "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Badkamer", "sensors": { "battery": 99, @@ -58,6 +59,7 @@ "firmware": "2020-11-10T01:00:00+01:00", "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", + "model_id": "160-01", "name": "Plug MediaTV", "sensors": { "electricity_consumed": 14.8, @@ -78,6 +80,7 @@ "firmware": "2020-11-10T01:00:00+01:00", "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", + "model_id": "160-01", "name": "Plug Werkplek", "sensors": { "electricity_consumed": 91.3, @@ -96,7 +99,8 @@ "available": true, "dev_class": "zz_misc", "location": "b4f211175e124df59603412bafa77a34", - "model": "lumi.plug.maeu01", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", "name": "SmartPlug Floor 0", "sensors": { "electricity_consumed_interval": 0.0 @@ -114,6 +118,7 @@ "firmware": "2020-11-10T01:00:00+01:00", "location": "f2bf9048bef64cc5b6d5110154e33c81", "model": "Plug", + "model_id": "160-01", "name": "Plug Vloerverwarming", "sensors": { "electricity_consumed": 43.8, @@ -141,6 +146,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "mode": "auto", "model": "ThermoTouch", + "model_id": "143.1", "name": "Anna", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "Weekschema", @@ -167,6 +173,7 @@ "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345679891", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", @@ -197,6 +204,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Lisa Badkamer", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "Badkamer", @@ -237,7 +245,7 @@ "cooling_present": false, "gateway_id": "da224107914542988a88561b4452b0f6", "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 149, + "item_count": 157, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/adam_zone_per_device/all_data.json b/fixtures/adam_zone_per_device/all_data.json index 7500db25d..a886aabc5 100644 --- a/fixtures/adam_zone_per_device/all_data.json +++ b/fixtures/adam_zone_per_device/all_data.json @@ -6,6 +6,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "c4d2bda6df8146caa2e5c2b5dc65660e", "model": "Plug", + "model_id": "160-01", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -26,6 +27,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "4efbab4c8bb84fbab26c8decf670eb96", "model": "Plug", + "model_id": "160-01", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 80.1, @@ -46,6 +48,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "0217e9743c174eef9d6e9f680d403ce2", "model": "Plug", + "model_id": "160-01", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -66,6 +69,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "2b1591ecf6344d4d93b03dece9747648", "model": "Plug", + "model_id": "160-01", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -90,6 +94,7 @@ "hardware": "1", "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Badkamer", "sensors": { "battery": 51, @@ -127,6 +132,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Jessie", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "CV Jessie", @@ -156,6 +162,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", + "model_id": "160-01", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.8, @@ -189,6 +196,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -213,6 +221,7 @@ "hardware": "1", "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", + "model_id": "106-03", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -237,6 +246,7 @@ "hardware": "1", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", + "model_id": "106-03", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -273,6 +283,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa WK", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "GF7 Woonkamer", @@ -302,6 +313,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "e704bae65654496f9cade9c855decdfe", "model": "Plug", + "model_id": "160-01", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -326,6 +338,7 @@ "hardware": "1", "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -363,6 +376,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa Bios", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", @@ -406,6 +420,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "mode": "heat", "model": "Tom/Floor", + "model_id": "106-03", "name": "CV Kraan Garage", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", @@ -451,6 +466,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Badkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Badkamer Schema", @@ -484,6 +500,7 @@ "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "select_regulation_mode": "heating", "sensors": { @@ -497,7 +514,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 323, + "item_count": 340, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/anna_elga_2/all_data.json b/fixtures/anna_elga_2/all_data.json index 79a5d0c58..b19e9288d 100644 --- a/fixtures/anna_elga_2/all_data.json +++ b/fixtures/anna_elga_2/all_data.json @@ -80,6 +80,7 @@ "location": "d34dfe6ab90b410c98068e75de3eb631", "mac_address": "C4930002FE76", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 13.0 @@ -91,7 +92,7 @@ "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 62, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_2_cooling/all_data.json b/fixtures/anna_elga_2_cooling/all_data.json index 6057777c1..3228601b2 100644 --- a/fixtures/anna_elga_2_cooling/all_data.json +++ b/fixtures/anna_elga_2_cooling/all_data.json @@ -80,6 +80,7 @@ "location": "d34dfe6ab90b410c98068e75de3eb631", "mac_address": "C4930002FE76", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 31.0 @@ -91,7 +92,7 @@ "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 62, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_2_schedule_off/all_data.json b/fixtures/anna_elga_2_schedule_off/all_data.json index fe409b70f..2dbb46934 100644 --- a/fixtures/anna_elga_2_schedule_off/all_data.json +++ b/fixtures/anna_elga_2_schedule_off/all_data.json @@ -80,6 +80,7 @@ "location": "d34dfe6ab90b410c98068e75de3eb631", "mac_address": "C4930002FE76", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 13.0 @@ -91,7 +92,7 @@ "cooling_present": true, "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 62, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_elga_no_cooling/all_data.json b/fixtures/anna_elga_no_cooling/all_data.json index 90c11d337..f54334c2a 100644 --- a/fixtures/anna_elga_no_cooling/all_data.json +++ b/fixtures/anna_elga_no_cooling/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 20.2 @@ -93,7 +94,7 @@ "cooling_present": false, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 62, + "item_count": 63, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_cooling/all_data.json b/fixtures/anna_heatpump_cooling/all_data.json index 6e31e3479..92c138769 100644 --- a/fixtures/anna_heatpump_cooling/all_data.json +++ b/fixtures/anna_heatpump_cooling/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 22.0 @@ -92,7 +93,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 63, + "item_count": 64, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json index 2303e2988..cfaedcb10 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 22.0 @@ -92,7 +93,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 63, + "item_count": 64, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_heatpump_heating/all_data.json b/fixtures/anna_heatpump_heating/all_data.json index 508828140..b767f5531 100644 --- a/fixtures/anna_heatpump_heating/all_data.json +++ b/fixtures/anna_heatpump_heating/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 20.2 @@ -97,7 +98,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 66, + "item_count": 67, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_cooling_active/all_data.json b/fixtures/anna_loria_cooling_active/all_data.json index 48c4be93c..24fc4f679 100644 --- a/fixtures/anna_loria_cooling_active/all_data.json +++ b/fixtures/anna_loria_cooling_active/all_data.json @@ -43,6 +43,7 @@ "location": "674b657c138a41a291d315d7471deb06", "mac_address": "C493000278E2", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 15.5 @@ -73,7 +74,8 @@ "setpoint": 40.0, "upper_bound": 45.0 }, - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { @@ -95,7 +97,7 @@ "cooling_present": true, "gateway_id": "9ff0569b4984459fb243af64c0901894", "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 64, + "item_count": 66, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_driessens/all_data.json b/fixtures/anna_loria_driessens/all_data.json index 0787fe23a..c07381ac0 100644 --- a/fixtures/anna_loria_driessens/all_data.json +++ b/fixtures/anna_loria_driessens/all_data.json @@ -10,6 +10,7 @@ "location": "82c15f65c9bf44c592d69e16139355e3", "mac_address": "D40FB2011556", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 6.81 @@ -79,7 +80,8 @@ "setpoint": 45.0, "upper_bound": 45.0 }, - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { @@ -101,7 +103,7 @@ "cooling_present": true, "gateway_id": "5c118b1842e943c0a5b6ef88a60bb17a", "heater_id": "a449cbc334ae4a5bb7f89064984b2906", - "item_count": 64, + "item_count": 66, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_loria_heating_idle/all_data.json b/fixtures/anna_loria_heating_idle/all_data.json index 15f3a2c57..9e553d33c 100644 --- a/fixtures/anna_loria_heating_idle/all_data.json +++ b/fixtures/anna_loria_heating_idle/all_data.json @@ -43,6 +43,7 @@ "location": "674b657c138a41a291d315d7471deb06", "mac_address": "C493000278E2", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 15.5 @@ -73,7 +74,8 @@ "setpoint": 40.0, "upper_bound": 45.0 }, - "model": "173", + "model": "Generic heater/cooler", + "model_id": "173", "name": "OpenTherm", "select_dhw_mode": "auto", "sensors": { @@ -95,7 +97,7 @@ "cooling_present": true, "gateway_id": "9ff0569b4984459fb243af64c0901894", "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 64, + "item_count": 66, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4/all_data.json b/fixtures/anna_v4/all_data.json index cad80f0bd..3e379bc3d 100644 --- a/fixtures/anna_v4/all_data.json +++ b/fixtures/anna_v4/all_data.json @@ -41,6 +41,7 @@ "location": "94c107dc6ac84ed98e9f68c0dd06bf71", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 7.44 @@ -68,7 +69,8 @@ "setpoint": 70.0, "upper_bound": 100.0 }, - "model": "2.32", + "model": "Generic heater", + "model_id": "2.32", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, @@ -87,7 +89,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 56, + "item_count": 58, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4_dhw/all_data.json b/fixtures/anna_v4_dhw/all_data.json index 433f4ca58..3df9ad3d4 100644 --- a/fixtures/anna_v4_dhw/all_data.json +++ b/fixtures/anna_v4_dhw/all_data.json @@ -41,6 +41,7 @@ "location": "94c107dc6ac84ed98e9f68c0dd06bf71", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 7.44 @@ -68,7 +69,8 @@ "setpoint": 70.0, "upper_bound": 100.0 }, - "model": "2.32", + "model": "Generic heater", + "model_id": "2.32", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, @@ -87,7 +89,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 56, + "item_count": 58, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_v4_no_tag/all_data.json b/fixtures/anna_v4_no_tag/all_data.json index 24dab45ff..43e725209 100644 --- a/fixtures/anna_v4_no_tag/all_data.json +++ b/fixtures/anna_v4_no_tag/all_data.json @@ -41,6 +41,7 @@ "location": "94c107dc6ac84ed98e9f68c0dd06bf71", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 7.44 @@ -68,7 +69,8 @@ "setpoint": 70.0, "upper_bound": 100.0 }, - "model": "2.32", + "model": "Generic heater", + "model_id": "2.32", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 39.9, @@ -87,7 +89,7 @@ "cooling_present": false, "gateway_id": "0466eae8520144c78afb29628384edeb", "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 56, + "item_count": 58, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/anna_without_boiler_fw441/all_data.json b/fixtures/anna_without_boiler_fw441/all_data.json index 4e1be4268..639907a67 100644 --- a/fixtures/anna_without_boiler_fw441/all_data.json +++ b/fixtures/anna_without_boiler_fw441/all_data.json @@ -41,6 +41,7 @@ "location": "0f4f2ada20734a339fe353348fe87b96", "mac_address": "D40FB200FA1C", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 8.31 @@ -61,7 +62,7 @@ "cooling_present": false, "gateway_id": "a270735e4ccd45239424badc0578a2b1", "heater_id": "c46b4794d28149699eacf053deedd003", - "item_count": 38, + "item_count": 39, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/legacy_anna/all_data.json b/fixtures/legacy_anna/all_data.json index 9eff69233..0f338e542 100644 --- a/fixtures/legacy_anna/all_data.json +++ b/fixtures/legacy_anna/all_data.json @@ -22,7 +22,8 @@ "setpoint": 50.0, "upper_bound": 90.0 }, - "model": "4.21", + "model": "Generic heater", + "model_id": "4.21", "name": "OpenTherm", "sensors": { "dhw_temperature": 51.2, @@ -62,7 +63,7 @@ "cooling_present": false, "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", "heater_id": "04e4cbfe7f4340f090f85ec3b9e6a950", - "item_count": 41, + "item_count": 42, "smile_name": "Smile Anna" } } diff --git a/fixtures/m_adam_cooling/all_data.json b/fixtures/m_adam_cooling/all_data.json index 16de7335d..166b13b84 100644 --- a/fixtures/m_adam_cooling/all_data.json +++ b/fixtures/m_adam_cooling/all_data.json @@ -36,6 +36,7 @@ "hardware": "1", "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Badkamer", "sensors": { "battery": 99, @@ -67,6 +68,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "mode": "cool", "model": "ThermoTouch", + "model_id": "143.1", "name": "Anna", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", @@ -93,6 +95,7 @@ "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345679891", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": [ "bleeding_hot", @@ -129,6 +132,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Lisa Badkamer", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "Badkamer", @@ -169,7 +173,7 @@ "cooling_present": true, "gateway_id": "da224107914542988a88561b4452b0f6", "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 149, + "item_count": 157, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/m_adam_heating/all_data.json b/fixtures/m_adam_heating/all_data.json index cf3c2dbbb..61935f130 100644 --- a/fixtures/m_adam_heating/all_data.json +++ b/fixtures/m_adam_heating/all_data.json @@ -41,6 +41,7 @@ "hardware": "1", "location": "f871b8c4d63549319221e294e4f88074", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Badkamer", "sensors": { "battery": 99, @@ -72,6 +73,7 @@ "location": "f2bf9048bef64cc5b6d5110154e33c81", "mode": "heat", "model": "ThermoTouch", + "model_id": "143.1", "name": "Anna", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "off", @@ -98,6 +100,7 @@ "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345679891", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", @@ -128,6 +131,7 @@ "location": "f871b8c4d63549319221e294e4f88074", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Lisa Badkamer", "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], "select_schedule": "Badkamer", @@ -168,7 +172,7 @@ "cooling_present": false, "gateway_id": "da224107914542988a88561b4452b0f6", "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 149, + "item_count": 157, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/m_adam_jip/all_data.json b/fixtures/m_adam_jip/all_data.json index 62b790813..50c3fa5a7 100644 --- a/fixtures/m_adam_jip/all_data.json +++ b/fixtures/m_adam_jip/all_data.json @@ -13,6 +13,7 @@ "location": "06aecb3d00354375924f50c47af36bd2", "mode": "off", "model": "Lisa", + "model_id": "158-01", "name": "Slaapkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -42,6 +43,7 @@ "hardware": "1", "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Logeerkamer", "sensors": { "setpoint": 13.0, @@ -65,6 +67,7 @@ "hardware": "1", "location": "06aecb3d00354375924f50c47af36bd2", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Slaapkamer", "sensors": { "setpoint": 13.0, @@ -85,7 +88,8 @@ "available": true, "dev_class": "zz_misc", "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "lumi.plug.maeu01", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", "name": "Plug", "sensors": { "electricity_consumed_interval": 0.0 @@ -110,6 +114,7 @@ "location": "d27aede973b54be484f6842d1b2802ad", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Kinderkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -139,6 +144,7 @@ "hardware": "1", "location": "13228dab8ce04617af318a2888b3c548", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Woonkamer", "sensors": { "setpoint": 9.0, @@ -168,6 +174,7 @@ "location": "d58fec52899f4f1c92e4f8fad6d8c48c", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Logeerkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -201,6 +208,7 @@ "location": "9e4433a9d69f40b3aefd15e74395eaec", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "select_gateway_mode": "full", @@ -218,6 +226,7 @@ "hardware": "1", "location": "d27aede973b54be484f6842d1b2802ad", "model": "Tom/Floor", + "model_id": "106-03", "name": "Tom Kinderkamer", "sensors": { "setpoint": 13.0, @@ -255,7 +264,8 @@ "setpoint": 90.0, "upper_bound": 90.0 }, - "model": "10.20", + "model": "Generic heater", + "model_id": "10.20", "name": "OpenTherm", "sensors": { "intended_boiler_temperature": 0.0, @@ -282,6 +292,7 @@ "location": "13228dab8ce04617af318a2888b3c548", "mode": "heat", "model": "Jip", + "model_id": "168-01", "name": "Woonkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -310,7 +321,7 @@ "cooling_present": false, "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 217, + "item_count": 228, "notifications": {}, "reboot": true, "smile_name": "Adam" diff --git a/fixtures/m_adam_multiple_devices_per_zone/all_data.json b/fixtures/m_adam_multiple_devices_per_zone/all_data.json index 8cc059242..7a61bf106 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/all_data.json @@ -6,6 +6,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "NVR", "sensors": { "electricity_consumed": 34.0, @@ -26,6 +27,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Playstation Smart Plug", "sensors": { "electricity_consumed": 84.1, @@ -46,6 +48,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "USG Smart Plug", "sensors": { "electricity_consumed": 8.5, @@ -66,6 +69,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Ziggo Modem", "sensors": { "electricity_consumed": 12.2, @@ -90,6 +94,7 @@ "hardware": "1", "location": "08963fec7c53423ca5680aa4cb502c63", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Badkamer", "sensors": { "battery": 51, @@ -127,6 +132,7 @@ "location": "82fa13f017d240daa0d0ea1775420f24", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Jessie", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "CV Jessie", @@ -156,6 +162,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Plug", + "model_id": "160-01", "name": "CV Pomp", "sensors": { "electricity_consumed": 35.6, @@ -189,6 +196,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "Fibaro HC2", "sensors": { "electricity_consumed": 12.5, @@ -213,6 +221,7 @@ "hardware": "1", "location": "12493538af164a409c6a1c79e38afe1c", "model": "Tom/Floor", + "model_id": "106-03", "name": "Bios Cv Thermostatic Radiator ", "sensors": { "battery": 62, @@ -237,6 +246,7 @@ "hardware": "1", "location": "c50f167537524366a5af7aa3942feb1e", "model": "Tom/Floor", + "model_id": "106-03", "name": "Floor kraan", "sensors": { "setpoint": 21.5, @@ -273,6 +283,7 @@ "location": "c50f167537524366a5af7aa3942feb1e", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa WK", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "GF7 Woonkamer", @@ -302,6 +313,7 @@ "firmware": "2019-06-21T02:00:00+02:00", "location": "cd143c07248f491493cea0533bc3d669", "model": "Plug", + "model_id": "160-01", "name": "NAS", "sensors": { "electricity_consumed": 16.5, @@ -326,6 +338,7 @@ "hardware": "1", "location": "82fa13f017d240daa0d0ea1775420f24", "model": "Tom/Floor", + "model_id": "106-03", "name": "Thermostatic Radiator Jessie", "sensors": { "battery": 62, @@ -363,6 +376,7 @@ "location": "12493538af164a409c6a1c79e38afe1c", "mode": "heat", "model": "Lisa", + "model_id": "158-01", "name": "Zone Lisa Bios", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "off", @@ -398,6 +412,7 @@ "location": "446ac08dd04d4eff8ac57489757b7314", "mode": "heat", "model": "Tom/Floor", + "model_id": "106-03", "name": "CV Kraan Garage", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "sensors": { @@ -442,6 +457,7 @@ "location": "08963fec7c53423ca5680aa4cb502c63", "mode": "auto", "model": "Lisa", + "model_id": "158-01", "name": "Zone Thermostat Badkamer", "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "select_schedule": "Badkamer Schema", @@ -475,6 +491,7 @@ "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_open_therm", "name": "Adam", "select_regulation_mode": "heating", "sensors": { @@ -488,7 +505,7 @@ "cooling_present": false, "gateway_id": "fe799307f1624099878210aa0b9f1475", "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 323, + "item_count": 340, "notifications": { "af82e4ccf9c548528166d38e560662a4": { "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." diff --git a/fixtures/m_anna_heatpump_cooling/all_data.json b/fixtures/m_anna_heatpump_cooling/all_data.json index cb30b9197..05f5e0ffa 100644 --- a/fixtures/m_anna_heatpump_cooling/all_data.json +++ b/fixtures/m_anna_heatpump_cooling/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 28.2 @@ -97,7 +98,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 66, + "item_count": 67, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/m_anna_heatpump_idle/all_data.json b/fixtures/m_anna_heatpump_idle/all_data.json index 660f6b5a7..327a87f94 100644 --- a/fixtures/m_anna_heatpump_idle/all_data.json +++ b/fixtures/m_anna_heatpump_idle/all_data.json @@ -10,6 +10,7 @@ "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile_thermo", "name": "Smile Anna", "sensors": { "outdoor_temperature": 28.2 @@ -97,7 +98,7 @@ "cooling_present": true, "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 66, + "item_count": 67, "notifications": {}, "reboot": true, "smile_name": "Smile Anna" diff --git a/fixtures/p1v4/all_data.json b/fixtures/p1v4/all_data.json index b6cc32f49..daba3ddbf 100644 --- a/fixtures/p1v4/all_data.json +++ b/fixtures/p1v4/all_data.json @@ -10,6 +10,7 @@ "location": "a455b61e52394b2db5081ce025a430f3", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile", "name": "Smile P1", "vendor": "Plugwise" }, @@ -40,7 +41,7 @@ }, "gateway": { "gateway_id": "a455b61e52394b2db5081ce025a430f3", - "item_count": 29, + "item_count": 30, "notifications": { "97a04c0c263049b29350a660b4cdd01e": { "warning": "The Smile P1 does not seem to be connected to a smart meter." diff --git a/fixtures/p1v4_442_single/all_data.json b/fixtures/p1v4_442_single/all_data.json index 7f1527792..3ea4bb01b 100644 --- a/fixtures/p1v4_442_single/all_data.json +++ b/fixtures/p1v4_442_single/all_data.json @@ -10,6 +10,7 @@ "location": "a455b61e52394b2db5081ce025a430f3", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile", "name": "Smile P1", "vendor": "Plugwise" }, @@ -42,7 +43,7 @@ }, "gateway": { "gateway_id": "a455b61e52394b2db5081ce025a430f3", - "item_count": 31, + "item_count": 32, "notifications": {}, "reboot": true, "smile_name": "Smile P1" diff --git a/fixtures/p1v4_442_triple/all_data.json b/fixtures/p1v4_442_triple/all_data.json index 582c883a3..b7476b24a 100644 --- a/fixtures/p1v4_442_triple/all_data.json +++ b/fixtures/p1v4_442_triple/all_data.json @@ -10,6 +10,7 @@ "location": "03e65b16e4b247a29ae0d75a78cb492e", "mac_address": "012345670001", "model": "Gateway", + "model_id": "smile", "name": "Smile P1", "vendor": "Plugwise" }, @@ -51,7 +52,7 @@ }, "gateway": { "gateway_id": "03e65b16e4b247a29ae0d75a78cb492e", - "item_count": 40, + "item_count": 41, "notifications": { "97a04c0c263049b29350a660b4cdd01e": { "warning": "The Smile P1 is not connected to a smart meter." From 6412df16907eed1a360b28e794f52a9ee5314838 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 19:22:08 +0200 Subject: [PATCH 34/50] Improve comment --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index ddb13c685..eee3610a9 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -389,7 +389,7 @@ def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch: mod_type = "electricity_point_meter" module_data = self._get_module_data(appliance, locator, mod_type) appl.hardware = module_data["hardware_version"] - appl.model = module_data["vendor_model"] # don't use model_id for P1 + appl.model = module_data["vendor_model"] # don't use model_id for Smartmeter appl.vendor_name = module_data["vendor_name"] appl.firmware = module_data["firmware_version"] From 1d6b6900cde2aa3cc8b3436e6a89ded2715285c8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 20:23:01 +0200 Subject: [PATCH 35/50] Revert "Full test-output" This reverts commit f6584044be5c624ca079b6c658c41825465ddcd8. --- scripts/tests_and_coverage.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/tests_and_coverage.sh b/scripts/tests_and_coverage.sh index 2e4a45336..b8dd17c9e 100755 --- a/scripts/tests_and_coverage.sh +++ b/scripts/tests_and_coverage.sh @@ -31,8 +31,7 @@ set +u if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "test_and_coverage" ] ; then # Python tests (rerun with debug if failures) - # PYTHONPATH=$(pwd) pytest -qx tests/ --cov='.' --no-cov-on-fail --cov-report term-missing || - PYTHONPATH=$(pwd) pytest -xrpP --log-level debug tests/ + PYTHONPATH=$(pwd) pytest -qx tests/ --cov='.' --no-cov-on-fail --cov-report term-missing || PYTHONPATH=$(pwd) pytest -xrpP --log-level debug tests/ fi if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "linting" ] ; then From b8d16a5b659b5e5bf08c0466ef200b9d57a68837 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 20:28:11 +0200 Subject: [PATCH 36/50] Optimize as suggested. --- plugwise/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index ac222731c..e61e3816f 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -101,11 +101,11 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) xml_2 = return_valid(xml_2, self._domain_objects) module_data = self._get_module_data(xml_1, locator, mod_type, xml_2) appl.vendor_name = module_data["vendor_name"] - if (model := module_data["vendor_model"]) == "ThermoTouch": - appl.model = model - else: - appl.model_id = model + appl.model = module_data["vendor_model"] + if appl.model != "ThermoTouch": + appl.model_id = appl.model appl.model = check_model(model, appl.vendor_name) + appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] appl.zigbee_mac = module_data["zigbee_mac_address"] From 555299283e24f5b40535c0ede09745232604fba1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 20:34:25 +0200 Subject: [PATCH 37/50] Add comment as suggested by Coderabbitai --- plugwise/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/common.py b/plugwise/common.py index e61e3816f..08d84ab2a 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -102,7 +102,7 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) module_data = self._get_module_data(xml_1, locator, mod_type, xml_2) appl.vendor_name = module_data["vendor_name"] appl.model = module_data["vendor_model"] - if appl.model != "ThermoTouch": + if appl.model != "ThermoTouch": # model_id for Anna not provided when stand-alone appl.model_id = appl.model appl.model = check_model(model, appl.vendor_name) From a2a625eb3b0a274bf53d074feb25705445fbf385 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 9 Sep 2024 20:37:29 +0200 Subject: [PATCH 38/50] Correct variable --- plugwise/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/common.py b/plugwise/common.py index 08d84ab2a..7785d5693 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -104,7 +104,7 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) appl.model = module_data["vendor_model"] if appl.model != "ThermoTouch": # model_id for Anna not provided when stand-alone appl.model_id = appl.model - appl.model = check_model(model, appl.vendor_name) + appl.model = check_model(appl.model, appl.vendor_name) appl.hardware = module_data["hardware_version"] appl.firmware = module_data["firmware_version"] From 631a4378e94fc6461e752ddea8f780b0bffb9f93 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:22:32 +0200 Subject: [PATCH 39/50] Don't modify legacy_anna data --- plugwise/__init__.py | 1 + plugwise/common.py | 3 ++- plugwise/helper.py | 3 ++- plugwise/legacy/helper.py | 2 +- plugwise/smile.py | 5 +++-- tests/data/anna/legacy_anna.json | 1 - tests/test_legacy_anna.py | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index bbcf47510..e2b996ff2 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -143,6 +143,7 @@ async def connect(self) -> bool: self.smile_fw_version, self.smile_hostname, self.smile_hw_version, + self.smile_legacy, self.smile_mac_address, self.smile_model, self.smile_name, diff --git a/plugwise/common.py b/plugwise/common.py index 7785d5693..56d8fb545 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -52,6 +52,7 @@ def _appl_heater_central_info( self, appl: Munch, xml_1: etree, + legacy: bool, xml_2: etree = None, xml_3: etree = None, ) -> Munch: @@ -85,7 +86,7 @@ def _appl_heater_central_info( module_data = self._get_module_data(xml_1, locator_2, mod_type, xml_3) appl.vendor_name = module_data["vendor_name"] appl.hardware = module_data["hardware_version"] - appl.model_id = module_data["vendor_model"] + appl.model_id = module_data["vendor_model"] if not legacy else None appl.model = ( "Generic heater/cooler" if self._cooling_present diff --git a/plugwise/helper.py b/plugwise/helper.py index eee3610a9..0a81b4efb 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -252,6 +252,7 @@ def __init__(self) -> None: self.loc_data: dict[str, ThermoLoc] self.smile_fw_version: str | None self.smile_hw_version: str | None + self.smile_legacy: bool self.smile_mac_address: str | None self.smile_model: str self.smile_name: str @@ -372,7 +373,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: return self._appl_thermostat_info(appl, appliance) case "heater_central": # Collect heater_central device info - self._appl_heater_central_info(appl, appliance) + self._appl_heater_central_info(appl, appliance, self.smile_legacy) self._appl_dhw_mode_info(appl, appliance) return appl case _: diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index b32176b01..abc1b0554 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -208,7 +208,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch: return self._appl_thermostat_info(appl, appliance, self._modules) # Collect heater_central device info case "heater_central": - return self._appl_heater_central_info(appl, appliance, self._appliances, self._modules) + return self._appl_heater_central_info(appl, appliance, True, self._appliances, self._modules) # Collect info from Stretches case _: return self._energy_device_info_finder(appliance, appl) diff --git a/plugwise/smile.py b/plugwise/smile.py index 1b9824508..0d0a34d08 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -60,6 +60,7 @@ def __init__( smile_fw_version: str | None, smile_hostname: str | None, smile_hw_version: str | None, + smile_legacy: bool, smile_mac_address: str | None, smile_model: str, smile_name: str, @@ -76,8 +77,6 @@ def __init__( port, timeout, ) - SmileData.__init__(self) - self._cooling_present = _cooling_present self._elga = _elga self._is_thermostat = _is_thermostat @@ -91,10 +90,12 @@ def __init__( self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version + self.smile_legacy = smile_legacy self.smile_mac_address = smile_mac_address self.smile_model = smile_model self.smile_name = smile_name self.smile_type = smile_type + SmileData.__init__(self) self._heater_id: str self._cooling_enabled = False diff --git a/tests/data/anna/legacy_anna.json b/tests/data/anna/legacy_anna.json index f8db5aec1..3514780ac 100644 --- a/tests/data/anna/legacy_anna.json +++ b/tests/data/anna/legacy_anna.json @@ -35,7 +35,6 @@ "dev_class": "heater_central", "location": "0000aaaa0000aaaa0000aaaa0000aa00", "model": "Generic heater", - "model_id": "4.21", "name": "OpenTherm", "vendor": "Bosch Thermotechniek B.V.", "maximum_boiler_temperature": { diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 5f1a28ca7..2475aff83 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(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" - assert self.device_items == 42 + assert self.device_items == 41 result = await self.tinker_legacy_thermostat(smile, schedule_on=False) assert result From 2952c26b1e08cbf1d133dce1910b29fdc7572b0b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:23:29 +0200 Subject: [PATCH 40/50] Save updated fixture --- fixtures/legacy_anna/all_data.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fixtures/legacy_anna/all_data.json b/fixtures/legacy_anna/all_data.json index 0f338e542..1eca4e285 100644 --- a/fixtures/legacy_anna/all_data.json +++ b/fixtures/legacy_anna/all_data.json @@ -23,7 +23,6 @@ "upper_bound": 90.0 }, "model": "Generic heater", - "model_id": "4.21", "name": "OpenTherm", "sensors": { "dhw_temperature": 51.2, @@ -63,7 +62,7 @@ "cooling_present": false, "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", "heater_id": "04e4cbfe7f4340f090f85ec3b9e6a950", - "item_count": 42, + "item_count": 41, "smile_name": "Smile Anna" } } From 4688bfa652e23aad3ddea049997fe4b83500c405 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:27:37 +0200 Subject: [PATCH 41/50] Simplify --- plugwise/__init__.py | 1 - plugwise/helper.py | 3 +-- plugwise/legacy/helper.py | 4 +++- plugwise/smile.py | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index e2b996ff2..bbcf47510 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -143,7 +143,6 @@ async def connect(self) -> bool: self.smile_fw_version, self.smile_hostname, self.smile_hw_version, - self.smile_legacy, self.smile_mac_address, self.smile_model, self.smile_name, diff --git a/plugwise/helper.py b/plugwise/helper.py index 0a81b4efb..f29d6e043 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -252,7 +252,6 @@ def __init__(self) -> None: self.loc_data: dict[str, ThermoLoc] self.smile_fw_version: str | None self.smile_hw_version: str | None - self.smile_legacy: bool self.smile_mac_address: str | None self.smile_model: str self.smile_name: str @@ -373,7 +372,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: return self._appl_thermostat_info(appl, appliance) case "heater_central": # Collect heater_central device info - self._appl_heater_central_info(appl, appliance, self.smile_legacy) + self._appl_heater_central_info(appl, appliance, False) # False = not legacy self._appl_dhw_mode_info(appl, appliance) return appl case _: diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index abc1b0554..73394591d 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -208,7 +208,9 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch: return self._appl_thermostat_info(appl, appliance, self._modules) # Collect heater_central device info case "heater_central": - return self._appl_heater_central_info(appl, appliance, True, self._appliances, self._modules) + return self._appl_heater_central_info( + appl, appliance, True, self._appliances, self._modules + ) # True = legacy # Collect info from Stretches case _: return self._energy_device_info_finder(appliance, appl) diff --git a/plugwise/smile.py b/plugwise/smile.py index 0d0a34d08..66bc29871 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -60,7 +60,6 @@ def __init__( smile_fw_version: str | None, smile_hostname: str | None, smile_hw_version: str | None, - smile_legacy: bool, smile_mac_address: str | None, smile_model: str, smile_name: str, @@ -90,7 +89,6 @@ def __init__( self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version - self.smile_legacy = smile_legacy self.smile_mac_address = smile_mac_address self.smile_model = smile_model self.smile_name = smile_name From c13af973e74c15464530f8508a12f25c22658f14 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:33:13 +0200 Subject: [PATCH 42/50] Improve comment --- plugwise/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/common.py b/plugwise/common.py index 56d8fb545..eb7734413 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -103,7 +103,7 @@ def _appl_thermostat_info(self, appl: Munch, xml_1: etree, xml_2: etree = None) module_data = self._get_module_data(xml_1, locator, mod_type, xml_2) appl.vendor_name = module_data["vendor_name"] appl.model = module_data["vendor_model"] - if appl.model != "ThermoTouch": # model_id for Anna not provided when stand-alone + if appl.model != "ThermoTouch": # model_id for Anna not present as stand-alone device appl.model_id = appl.model appl.model = check_model(appl.model, appl.vendor_name) From 00d0fcb52db2dd5b7d135f254c64079ba50704dd Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:36:30 +0200 Subject: [PATCH 43/50] Revert unneeded change --- plugwise/smile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index 66bc29871..1b9824508 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -76,6 +76,8 @@ def __init__( port, timeout, ) + SmileData.__init__(self) + self._cooling_present = _cooling_present self._elga = _elga self._is_thermostat = _is_thermostat @@ -93,7 +95,6 @@ def __init__( self.smile_model = smile_model self.smile_name = smile_name self.smile_type = smile_type - SmileData.__init__(self) self._heater_id: str self._cooling_enabled = False From d07c9cbea6d8e934487e2008deb04b229190bac3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 19:58:29 +0200 Subject: [PATCH 44/50] Prettify test-jsons too --- scripts/tests_and_coverage.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tests_and_coverage.sh b/scripts/tests_and_coverage.sh index b8dd17c9e..44d07a354 100755 --- a/scripts/tests_and_coverage.sh +++ b/scripts/tests_and_coverage.sh @@ -49,9 +49,9 @@ fi if [ -z "${GITHUB_ACTIONS}" ] || [ "$1" == "fixtures" ] ; then echo "... crafting manual fixtures ..." PYTHONPATH=$(pwd) python3 scripts/manual_fixtures.py - echo "... prettier-ing (fixtures) ..." - npx prettier --write --list-different --ignore-unknown --log-level silent fixtures/ + echo "... prettier-ing (fixtures and testdata) ..." + npx prettier --write --list-different --ignore-unknown --log-level silent fixtures/ tests/data else - echo "... prettier-ing (fixtures) ..." - npx prettier --write --list-different --ignore-unknown --log-level silent fixtures/ + echo "... prettier-ing (fixtures and testdata) ..." + npx prettier --write --list-different --ignore-unknown --log-level silent fixtures/ tests/data fi From 27302ea1b4c92c2e3690aae31b197263a482b26e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 20:07:25 +0200 Subject: [PATCH 45/50] Save prettied testdata-results --- tests/data/adam/adam_plus_anna_new.json | 8 ++++---- tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/data/adam/adam_plus_anna_new.json b/tests/data/adam/adam_plus_anna_new.json index 234dbc689..6c6d0e1b2 100644 --- a/tests/data/adam/adam_plus_anna_new.json +++ b/tests/data/adam/adam_plus_anna_new.json @@ -71,8 +71,8 @@ "zigbee_mac_address": "000D6F000C869B61", "vendor": "Plugwise", "binary_sensors": { - "low_battery": true - }, + "low_battery": true + }, "sensors": { "temperature": 16.5, "setpoint": 18, @@ -182,8 +182,8 @@ "zigbee_mac_address": "000D6F000C8FF5EE", "vendor": "Plugwise", "binary_sensors": { - "low_battery": false - }, + "low_battery": false + }, "sensors": { "temperature": 17.6, "setpoint": 18, diff --git a/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json b/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json index 8737eb503..93552c495 100644 --- a/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json +++ b/tests/data/adam/adam_plus_anna_new_UPDATED_DATA.json @@ -28,8 +28,8 @@ }, "e2f4322d57924fa090fbbc48b3a140dc": { "binary_sensors": { - "low_battery": true - }, + "low_battery": true + }, "mode": "off" }, "da224107914542988a88561b4452b0f6": { From 12190ca6fd13830f31b3cbdfb5390a05c0568af8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 20:13:29 +0200 Subject: [PATCH 46/50] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 457bd0bf1..b4352938d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.3.0 + +- New Feature: add device model_id's to the API output (not for legacy devices). + ## v1.2.0 - Improve the low_battery feature, also take the battery-critically-low warning notification into account. From 83e8232f06c66707bec285442adffcaf50842366 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 20:14:06 +0200 Subject: [PATCH 47/50] Bump to v1.3.0a0 test-version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ac6b0fa92..01680b9fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.2.0" +version = "1.3.0a0" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From b9c9587bef01334c45c64189725d803da5f437e8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 10 Sep 2024 20:17:15 +0200 Subject: [PATCH 48/50] Fix comments seen as commented-out code --- plugwise/helper.py | 2 +- plugwise/legacy/helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index f29d6e043..1e2aca7b4 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -372,7 +372,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: return self._appl_thermostat_info(appl, appliance) case "heater_central": # Collect heater_central device info - self._appl_heater_central_info(appl, appliance, False) # False = not legacy + self._appl_heater_central_info(appl, appliance, False) # False means non-legacy device self._appl_dhw_mode_info(appl, appliance) return appl case _: diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 73394591d..c50e65637 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -210,7 +210,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch: case "heater_central": return self._appl_heater_central_info( appl, appliance, True, self._appliances, self._modules - ) # True = legacy + ) # True means legacy device # Collect info from Stretches case _: return self._energy_device_info_finder(appliance, appl) From 6cd36ffa8245fda8333fdff9bbce014e3184902e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 11 Sep 2024 08:02:49 +0200 Subject: [PATCH 49/50] Plugs are not connected to a P1 --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 1e2aca7b4..1b276d1a4 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -382,7 +382,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch: """Helper-function for _appliance_info_finder(). - Collect energy device info (Smartmeter, Plug): firmware, model and vendor name. + Collect energy device info (Smartmeter): firmware, model and vendor name. """ if self.smile_type == "power": locator = "./logs/point_log/electricity_point_meter" From 22825400025cfb788c8aff2086a2f6eb4595819e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 11 Sep 2024 08:03:29 +0200 Subject: [PATCH 50/50] Bump to v1.3.0 release-version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01680b9fc..85787e711 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.3.0a0" +version = "1.3.0" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md"