Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
b1ac1a5
_all_appliances(): reorder code, all checks first
bouwew Dec 15, 2025
8520203
More reordering, improvements
bouwew Dec 15, 2025
9ada3a7
Try
bouwew Dec 15, 2025
c49f00a
Try 2
bouwew Dec 15, 2025
d3ede2d
Try 3
bouwew Dec 15, 2025
1c13c3b
Try 4
bouwew Dec 15, 2025
fd1aedd
Debug
bouwew Dec 15, 2025
54d768d
Try 5
bouwew Dec 15, 2025
041cb50
Try 6
bouwew Dec 15, 2025
648a8ac
Try 7
bouwew Dec 15, 2025
d31421a
Update updates/adam_plus_anna_new-xml
bouwew Dec 15, 2025
4bd4a5d
Store module_id for future use
bouwew Dec 16, 2025
a243a2e
Increase entity_items assert
bouwew Dec 16, 2025
3aaa8a1
Update test-json
bouwew Dec 16, 2025
8ae8dc6
Starting...
bouwew Dec 16, 2025
01cee35
Update zigbee reachable status
bouwew Dec 16, 2025
bb0cd25
fixup: different-update Python code fixed using ruff
Dec 16, 2025
d3d9b49
Detect removed appliances and pop them
bouwew Dec 17, 2025
e27c8c0
Remove debug-logging, guard _add_p1_smartmeter_info()
bouwew Dec 17, 2025
780b117
Improve/rework _get_groups()
bouwew Dec 17, 2025
a110148
_all_appliances(), _all_locations() -> _get_appliances(), _get_locati…
bouwew Dec 17, 2025
cb17cf4
Optimize
bouwew Dec 17, 2025
63b5942
Fixes
bouwew Dec 18, 2025
fdf6e8f
Add existing/new detection in _get_locations() and related
bouwew Dec 18, 2025
8b0c908
Add existing/new detection for zones
bouwew Dec 18, 2025
583ce15
Optimize, clean up
bouwew Dec 18, 2025
af2cb79
Make sure to update all (thermo)zones as there can be changes in a zo…
bouwew Dec 18, 2025
7b5a4d2
fixup: different-update Python code fixed using ruff
Dec 18, 2025
d17c8da
Fix typo, clean up debugging
bouwew Dec 18, 2025
8af09d6
More fixes
bouwew Dec 18, 2025
b9edfd9
Fix SonarCloud reports
bouwew Dec 18, 2025
29b45eb
Fix double zone-pop
bouwew Dec 18, 2025
90b932e
Add missing self
bouwew Dec 18, 2025
af20d11
Make sure to detect location-name change
bouwew Dec 18, 2025
b140857
Change the THERMO_MATCHING constant
bouwew Dec 18, 2025
18695a6
Improve _add_member()
bouwew Dec 18, 2025
05f247e
Detect smartmeter change
bouwew Dec 18, 2025
3a3de0e
Use in-construct as suggested
bouwew Dec 18, 2025
44d92e4
Use .get() constructs as suggested
bouwew Dec 18, 2025
8bfab68
Update test entity_items asserts and test-jsons
bouwew Dec 18, 2025
4054328
Debug
bouwew Dec 18, 2025
8ef0d49
Try
bouwew Dec 18, 2025
c442c00
Debug 2
bouwew Dec 18, 2025
225e285
Detect appliance name-change
bouwew Dec 19, 2025
e34a414
Update test entity_items asserts and test-jsons - 2
bouwew Dec 19, 2025
ca7ff51
Rework legacy - 2
bouwew Dec 19, 2025
b03ad00
Update test entity_items asserts and test-jsons - 3
bouwew Dec 19, 2025
0b55efb
Typing and other fixes
bouwew Dec 20, 2025
ec66121
Save updated fixtures
bouwew Dec 20, 2025
6d75e66
Adapt _get_zigbee_availability() after rebase
bouwew Dec 20, 2025
08a743e
Clean up after rebase
bouwew Dec 22, 2025
e73213c
Fixes rebase issues
bouwew Dec 22, 2025
b59b0e2
Handle group name change, improve guarding
bouwew Dec 22, 2025
2744e86
More fixing after rebase
bouwew Dec 22, 2025
0e89fd8
Finish zone logic
bouwew Dec 22, 2025
c85cfb3
Add comments
bouwew Dec 22, 2025
80e0fdc
Improve _get_appliances() return logic
bouwew Dec 23, 2025
0e6c9d6
Set to v1.12.0a1 for testing
bouwew Dec 23, 2025
b77f668
Try
bouwew Dec 23, 2025
98cd677
Correct entity-assert
bouwew Dec 25, 2025
1acf967
Add entity-assert test for updating
bouwew Dec 25, 2025
b1fca7d
Guard for appliances with changed names
bouwew Dec 25, 2025
458be53
Correct updated entity-items assert
bouwew Dec 25, 2025
e9b8839
Fix logic, don't base on names
bouwew Dec 25, 2025
300eb96
Correct 2nd updated entity-assert
bouwew Dec 25, 2025
c57fac6
Ruffed
bouwew Dec 25, 2025
a02c9e1
Clean up
bouwew Dec 25, 2025
2381ca3
Improve _add_or_update_notifications()
bouwew Dec 25, 2025
3de5746
Improve logic
bouwew Dec 25, 2025
8325136
Bump to a2
bouwew Dec 25, 2025
d18e598
_get_appliances(): return also True for removed appliances
bouwew Dec 25, 2025
37bde6a
Implement _get_groups() enhancement as suggested
bouwew Dec 25, 2025
0d78208
Implement pop-suggestion
bouwew Dec 25, 2025
ffe8711
Ruffed, bump to a3
bouwew Dec 25, 2025
ff14162
Don't double-count notification-related
bouwew Dec 25, 2025
6d53670
Rename to _update_zigbee_availability(), add docstring
bouwew Dec 25, 2025
597e021
Bump to a4
bouwew Dec 25, 2025
846ca96
Add err to raise messages
bouwew Dec 27, 2025
6a1c597
Bump to a5
bouwew Dec 27, 2025
468d451
Improve _get_groups()
bouwew Dec 27, 2025
29d0a16
Improve _get_appliances() logic
bouwew Dec 27, 2025
4a7c611
Fix typo
bouwew Dec 27, 2025
67309e7
Correct logic
bouwew Dec 27, 2025
622f099
Don't re-init self.gw_entities
bouwew Dec 27, 2025
a3df547
Try
bouwew Dec 27, 2025
8e63576
Move _get_appliances_with_offset_functionality()
bouwew Dec 28, 2025
1c74c51
Try 2
bouwew Dec 28, 2025
205265e
Improve _get_groups()
bouwew Dec 28, 2025
05fc576
Avoid adding "_plug" when already present
bouwew Dec 28, 2025
0512af7
Save entity_id locally
bouwew Dec 28, 2025
b0d4822
Clean up
bouwew Dec 28, 2025
15a7115
Re-enable init
bouwew Dec 28, 2025
4b9a102
Ruffed
bouwew Dec 28, 2025
f37c619
Add pragma-no-cover, remove unused code
bouwew Dec 28, 2025
46bd479
Bump to a6
bouwew Dec 28, 2025
181e615
Fix as suggested
bouwew Dec 28, 2025
d72087f
Bump to a7
bouwew Dec 28, 2025
10130a8
Debug
bouwew Dec 28, 2025
21abad2
Bump to a8
bouwew Dec 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions fixtures/adam_heatpump_cooling/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
},
"model": "Generic heater/cooler",
"model_id": "17.1",
"module_id": "1ad05e10747b4e40ba2ba82f2872d1c1",
"name": "OpenTherm",
"sensors": {
"dhw_temperature": 63.5,
Expand All @@ -84,6 +85,7 @@
"location": "b52908550469425b812c87f766fe5303",
"model": "Lisa",
"model_id": "158-01",
"module_id": "1f0d0e98291145afa4da4432f76a7bd2",
"name": "Thermostaat BK",
"sensors": {
"battery": 55,
Expand All @@ -106,6 +108,7 @@
"location": "20e735858f8146cead98b873177a4f99",
"model": "Plug",
"model_id": "160-01",
"module_id": "0a00ddca4e9543c69c6648e5488590dd",
"name": "Smart Plug DB",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -160,6 +163,7 @@
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
"model": "Plug",
"model_id": "160-01",
"module_id": "3fa224c4c39f458583b2dab4515210bf",
"name": "Smart Plug KK",
"sensors": {
"electricity_consumed": 2.13,
Expand All @@ -180,6 +184,7 @@
"location": "04b15f6e884448288f811d29fb7b1b30",
"model": "Plug",
"model_id": "160-01",
"module_id": "483836101eb141e2b04045eedc3716ff",
"name": "Smart Plug SJ",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -200,6 +205,7 @@
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
"model": "Plug",
"model_id": "160-01",
"module_id": "e20da25d0cbf456097aa1a954efed11b",
"name": "Smart Plug WK",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -221,6 +227,7 @@
"location": "20e735858f8146cead98b873177a4f99",
"model": "Lisa",
"model_id": "158-01",
"module_id": "ddd4ed4873864199b6121459ae9fa4ae",
"name": "Thermostaat DB",
"sensors": {
"setpoint": 18.0,
Expand Down Expand Up @@ -275,6 +282,7 @@
"location": "9a27714b970547ee9a6bdadc2b815ad5",
"model": "Plug",
"model_id": "160-01",
"module_id": "2028add51f214a3dbddfa1706e63cfed",
"name": "Smart Plug SQ",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -325,6 +333,7 @@
"location": "e39529c79ab54fda9bed26cfc0447546",
"model": "Lisa",
"model_id": "158-01",
"module_id": "d2f732f328ba447abd5be12f2e196205",
"name": "Thermostaat JM",
"sensors": {
"setpoint": 18.0,
Expand All @@ -346,6 +355,7 @@
"location": "b52908550469425b812c87f766fe5303",
"model": "Plug",
"model_id": "160-01",
"module_id": "44fe408e4afd47c19928941ef5499298",
"name": "Smart Plug BK",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -366,6 +376,7 @@
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
"model": "Plug",
"model_id": "160-01",
"module_id": "1695cccaacc94580860544338b272ce0",
"name": "Smart Plug BK2",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -453,6 +464,7 @@
"location": "e39529c79ab54fda9bed26cfc0447546",
"model": "Plug",
"model_id": "160-01",
"module_id": "9a3848f23b814b708f7f5bf15702c60d",
"name": "Smart Plug JM",
"sensors": {
"electricity_consumed": 0.0,
Expand Down Expand Up @@ -507,6 +519,7 @@
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
"model": "Plug",
"model_id": "160-01",
"module_id": "3e205ba6cede43e5b461e7c76340a64d",
"name": "Smart Plug RB",
"sensors": {
"electricity_consumed": 3.13,
Expand Down Expand Up @@ -595,6 +608,7 @@
"location": "8cf650a4c10c44819e426bed406aec34",
"model": "Plug",
"model_id": "160-01",
"module_id": "7435452fbc684a30a4978913f342c68b",
"name": "Smart Plug BK1",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -616,6 +630,7 @@
"location": "9a27714b970547ee9a6bdadc2b815ad5",
"model": "Lisa",
"model_id": "158-01",
"module_id": "6991158ce7774dca864ec8fcf7a039ab",
"name": "Thermostaat SQ",
"sensors": {
"setpoint": 18.5,
Expand All @@ -638,6 +653,7 @@
"location": "93ac3f7bf25342f58cbb77c4a99ac0b3",
"model": "Lisa",
"model_id": "158-01",
"module_id": "11e4f552602c4b03980e0955e0f114f0",
"name": "Thermostaat RB",
"sensors": {
"setpoint": 17.0,
Expand All @@ -657,6 +673,7 @@
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
"model": "ThermoTouch",
"model_id": "143.1",
"module_id": "e2d52aece0524fde9c346953e5e1acb2",
"name": "Thermostaat WK",
"sensors": {
"setpoint": 21.5,
Expand All @@ -672,6 +689,7 @@
"location": "04b15f6e884448288f811d29fb7b1b30",
"model": "Lisa",
"model_id": "158-01",
"module_id": "21d57d51898b41c69ad87fffb59f2581",
"name": "Thermostaat SJ",
"sensors": {
"setpoint": 20.5,
Expand Down Expand Up @@ -731,6 +749,7 @@
"location": "a562019b0b1f47a4bde8ebe3dbe3e8a9",
"model": "Lisa",
"model_id": "158-01",
"module_id": "0f19738aed2e4bc09e0ca832f2e0c5a4",
"name": "Thermostaat KK",
"sensors": {
"battery": 53,
Expand All @@ -754,6 +773,7 @@
"location": "8cf650a4c10c44819e426bed406aec34",
"model": "Lisa",
"model_id": "158-01",
"module_id": "efe84c28928a4ce08603024b5edc2fc7",
"name": "Thermostaat BK1",
"sensors": {
"setpoint": 20.5,
Expand All @@ -776,6 +796,7 @@
"location": "5cc21042f87f4b4c94ccb5537c47a53f",
"model": "Lisa",
"model_id": "158-01",
"module_id": "867bdfa029f042e2a50ab9974cff6fac",
"name": "Thermostaat BK2",
"sensors": {
"setpoint": 20.5,
Expand Down
10 changes: 10 additions & 0 deletions fixtures/adam_jip/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Lisa",
"model_id": "158-01",
"module_id": "9a08c0d05ffd4f02be9a9bdeb3d01175",
"name": "Slaapkamer",
"sensors": {
"battery": 92,
Expand All @@ -87,6 +88,7 @@
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Tom",
"model_id": "106-03",
"module_id": "e71d43382a894c9e888d379368aafba9",
"name": "Tom Logeerkamer",
"sensors": {
"setpoint": 13.0,
Expand All @@ -111,6 +113,7 @@
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom",
"model_id": "106-03",
"module_id": "ccc140dafdc5416dab052bffc465a770",
"name": "Tom Slaapkamer",
"sensors": {
"setpoint": 13.0,
Expand All @@ -133,6 +136,7 @@
"location": "9e4433a9d69f40b3aefd15e74395eaec",
"model": "Aqara Smart Plug",
"model_id": "lumi.plug.maeu01",
"module_id": "2ddb4057a8fd46aba92e23c770f3297d",
"name": "Plug",
"sensors": {
"electricity_consumed_interval": 0.0
Expand All @@ -155,6 +159,7 @@
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Lisa",
"model_id": "158-01",
"module_id": "3f91eab3749349799b17f04873bde07e",
"name": "Kinderkamer",
"sensors": {
"battery": 79,
Expand All @@ -178,6 +183,7 @@
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Tom",
"model_id": "106-03",
"module_id": "fc657e19ee7442ab8bfe66df62cb40b3",
"name": "Tom Woonkamer",
"sensors": {
"setpoint": 9.0,
Expand Down Expand Up @@ -205,6 +211,7 @@
"location": "d58fec52899f4f1c92e4f8fad6d8c48c",
"model": "Lisa",
"model_id": "158-01",
"module_id": "1814d63fb9824aa8aae4d4329d84dfa3",
"name": "Logeerkamer",
"sensors": {
"battery": 80,
Expand Down Expand Up @@ -278,6 +285,7 @@
"location": "d27aede973b54be484f6842d1b2802ad",
"model": "Tom",
"model_id": "106-03",
"module_id": "5785d8678bed443ea72b52a1c8a7108d",
"name": "Tom Kinderkamer",
"sensors": {
"setpoint": 13.0,
Expand Down Expand Up @@ -344,6 +352,7 @@
},
"model": "Generic heater",
"model_id": "10.20",
"module_id": "2bd6e83f0ae340058606c33503202c72",
"name": "OpenTherm",
"sensors": {
"intended_boiler_temperature": 0.0,
Expand All @@ -368,6 +377,7 @@
"location": "13228dab8ce04617af318a2888b3c548",
"model": "Jip",
"model_id": "168-01",
"module_id": "73a5e7c19d3744ad96dfad74142d2db4",
"name": "Woonkamer",
"sensors": {
"battery": 100,
Expand Down
16 changes: 16 additions & 0 deletions fixtures/adam_multiple_devices_per_zone/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "4e1da90f22384bc691fe0282e02d272f",
"name": "NVR",
"sensors": {
"electricity_consumed": 34.0,
Expand Down Expand Up @@ -96,6 +97,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "a03128e5e9334b088c724fd96947c765",
"name": "Playstation Smart Plug",
"sensors": {
"electricity_consumed": 84.1,
Expand Down Expand Up @@ -149,6 +151,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "822e635587994817a76599ea1190f9ee",
"name": "USG Smart Plug",
"sensors": {
"electricity_consumed": 8.5,
Expand All @@ -170,6 +173,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "a5a8713dd3f94f2a9d63db8a521af6b2",
"name": "Ziggo Modem",
"sensors": {
"electricity_consumed": 12.2,
Expand All @@ -195,6 +199,7 @@
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom",
"model_id": "106-03",
"module_id": "b622e3c6a32544f8a4d83e3385592e36",
"name": "Thermostatic Radiator Badkamer 1",
"sensors": {
"battery": 51,
Expand Down Expand Up @@ -223,6 +228,7 @@
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Lisa",
"model_id": "158-01",
"module_id": "f887b0af3d1e45c794057ee606b21db8",
"name": "Zone Thermostat Jessie",
"sensors": {
"battery": 37,
Expand All @@ -245,6 +251,7 @@
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Plug",
"model_id": "160-01",
"module_id": "800d5287643c4fd89dfcfbf336d4f7ec",
"name": "CV Pomp",
"sensors": {
"electricity_consumed": 35.6,
Expand Down Expand Up @@ -311,6 +318,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "5ccda7375b0f467e88499a636450dc91",
"name": "Fibaro HC2",
"sensors": {
"electricity_consumed": 12.5,
Expand All @@ -336,6 +344,7 @@
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom",
"model_id": "106-03",
"module_id": "39e077a2eb224dcea3415471de00823c",
"name": "Bios Cv Thermostatic Radiator ",
"sensors": {
"battery": 62,
Expand All @@ -361,6 +370,7 @@
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom",
"model_id": "106-03",
"module_id": "02d1299fdbab4f7b93765e0af1c250d8",
"name": "Floor kraan",
"sensors": {
"setpoint": 21.5,
Expand Down Expand Up @@ -388,6 +398,7 @@
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Lisa",
"model_id": "158-01",
"module_id": "dd68d0641eb04571be62b9940aae363a",
"name": "Zone Lisa WK",
"sensors": {
"battery": 34,
Expand Down Expand Up @@ -444,6 +455,7 @@
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"model_id": "160-01",
"module_id": "3e4e2fa7fa2a4cf18b1be5ed32a978a1",
"name": "NAS",
"sensors": {
"electricity_consumed": 16.5,
Expand All @@ -469,6 +481,7 @@
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom",
"model_id": "106-03",
"module_id": "468bbe14853f4fb18a8860333cecc42a",
"name": "Thermostatic Radiator Jessie",
"sensors": {
"battery": 62,
Expand Down Expand Up @@ -497,6 +510,7 @@
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Lisa",
"model_id": "158-01",
"module_id": "e5f81fd832d844e5bd46219831468a62",
"name": "Zone Lisa Bios",
"sensors": {
"battery": 67,
Expand Down Expand Up @@ -537,6 +551,7 @@
"location": "446ac08dd04d4eff8ac57489757b7314",
"model": "Tom",
"model_id": "106-03",
"module_id": "d00e1ba75ed14b2388971b32abc94cde",
"name": "CV Kraan Garage",
"sensors": {
"battery": 68,
Expand Down Expand Up @@ -582,6 +597,7 @@
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Lisa",
"model_id": "158-01",
"module_id": "ebd9f53ab3894bee91e36350c1fbb6c7",
"name": "Thermostatic Radiator Badkamer 2",
"sensors": {
"battery": 92,
Expand Down
1 change: 1 addition & 0 deletions fixtures/adam_onoff_cooling_fake_firmware/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"location": "fa5fa6b34f6b40a0972988b20e888ed4",
"model": "ThermoTouch",
"model_id": "143.1",
"module_id": "e2d52aece0524fde9c346953e5e1acb2",
"name": "Thermostaat WK",
"sensors": {
"setpoint": 21.5,
Expand Down
Loading