Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
207134f
_all_appliances(): reorder code, all checks first
bouwew Dec 15, 2025
92f9ab1
More reordering, improvements
bouwew Dec 15, 2025
921605a
Try
bouwew Dec 15, 2025
48bca0d
Try 2
bouwew Dec 15, 2025
b926a38
Try 3
bouwew Dec 15, 2025
973158d
Try 4
bouwew Dec 15, 2025
1df7301
Debug
bouwew Dec 15, 2025
9f29f26
Try 5
bouwew Dec 15, 2025
7946a0b
Try 6
bouwew Dec 15, 2025
0240992
Try 7
bouwew Dec 15, 2025
6334dd3
Update updates/adam_plus_anna_new-xml
bouwew Dec 15, 2025
40aef8e
Store module_id for future use
bouwew Dec 16, 2025
253971c
Increase entity_items assert
bouwew Dec 16, 2025
cf8bb3b
Update test-json
bouwew Dec 16, 2025
8c59bc3
Starting...
bouwew Dec 16, 2025
00b1aa7
Update zigbee reachable status
bouwew Dec 16, 2025
abb427d
fixup: different-update Python code fixed using ruff
Dec 16, 2025
05156e6
Detect removed appliances and pop them
bouwew Dec 17, 2025
740be1f
Remove debug-logging, guard _add_p1_smartmeter_info()
bouwew Dec 17, 2025
db43884
Improve/rework _get_groups()
bouwew Dec 17, 2025
04f7ea1
_all_appliances(), _all_locations() -> _get_appliances(), _get_locati…
bouwew Dec 17, 2025
052e17e
Optimize
bouwew Dec 17, 2025
33ec417
Fixes
bouwew Dec 18, 2025
4d61588
Add existing/new detection in _get_locations() and related
bouwew Dec 18, 2025
ba0e307
Add existing/new detection for zones
bouwew Dec 18, 2025
0e80479
Optimize, clean up
bouwew Dec 18, 2025
a11de30
Make sure to update all (thermo)zones as there can be changes in a zo…
bouwew Dec 18, 2025
4e84df9
fixup: different-update Python code fixed using ruff
Dec 18, 2025
912cc41
Fix typo, clean up debugging
bouwew Dec 18, 2025
84af2b2
More fixes
bouwew Dec 18, 2025
b10bb85
Fix SonarCloud reports
bouwew Dec 18, 2025
b77a4c2
Fix double zone-pop
bouwew Dec 18, 2025
a0fdefa
Add missing self
bouwew Dec 18, 2025
3a7fa14
Make sure to detect location-name change
bouwew Dec 18, 2025
e6951c0
Change the THERMO_MATCHING constant
bouwew Dec 18, 2025
0c0ecd7
Improve _add_member()
bouwew Dec 18, 2025
2bc1551
Detect smartmeter change
bouwew Dec 18, 2025
ecc68ea
Use in-construct as suggested
bouwew Dec 18, 2025
68d5176
Use .get() constructs as suggested
bouwew Dec 18, 2025
f3273f5
Update test entity_items asserts and test-jsons
bouwew Dec 18, 2025
86feb0e
Debug
bouwew Dec 18, 2025
355ed08
Try
bouwew Dec 18, 2025
7c4bb99
Debug 2
bouwew Dec 18, 2025
6d069f1
Detect appliance name-change
bouwew Dec 19, 2025
49cf501
Update test entity_items asserts and test-jsons - 2
bouwew Dec 19, 2025
8500aaf
Rework legacy - 2
bouwew Dec 19, 2025
af52ce7
Update test entity_items asserts and test-jsons - 3
bouwew Dec 19, 2025
c3841de
Typing and other fixes
bouwew Dec 20, 2025
92bf5a7
Save updated fixtures
bouwew Dec 20, 2025
bc46356
Adapt _get_zigbee_availability() after rebase
bouwew Dec 20, 2025
10a0973
Clean up after rebase
bouwew Dec 22, 2025
046ff4c
Fixes rebase issues
bouwew Dec 22, 2025
d73239d
Handle group name change, improve guarding
bouwew Dec 22, 2025
8e5a2a3
More fixing after rebase
bouwew Dec 22, 2025
2dd3526
Finish zone logic
bouwew Dec 22, 2025
8a6934f
Add comments
bouwew Dec 22, 2025
b8acdfb
Improve _get_appliances() return logic
bouwew Dec 23, 2025
6ac5bbd
Set to v1.12.0a1 for testing
bouwew Dec 23, 2025
1409d3c
Try
bouwew Dec 23, 2025
202c452
Correct entity-assert
bouwew Dec 25, 2025
ce70539
Add entity-assert test for updating
bouwew Dec 25, 2025
726f25c
Guard for appliances with changed names
bouwew Dec 25, 2025
6389d43
Correct updated entity-items assert
bouwew Dec 25, 2025
edeb5be
Fix logic, don't base on names
bouwew Dec 25, 2025
4c6cab9
Correct 2nd updated entity-assert
bouwew Dec 25, 2025
e7499b6
Ruffed
bouwew Dec 25, 2025
d99b49d
Clean up
bouwew Dec 25, 2025
03e4a89
Improve _add_or_update_notifications()
bouwew Dec 25, 2025
7fc0444
Improve logic
bouwew Dec 25, 2025
a224806
Bump to a2
bouwew Dec 25, 2025
6a4d25a
_get_appliances(): return also True for removed appliances
bouwew Dec 25, 2025
995d577
Implement _get_groups() enhancement as suggested
bouwew Dec 25, 2025
3f28436
Implement pop-suggestion
bouwew Dec 25, 2025
b96e79d
Ruffed, bump to a3
bouwew Dec 25, 2025
8e7f1a9
Don't double-count notification-related
bouwew Dec 25, 2025
5f4350a
Rename to _update_zigbee_availability(), add docstring
bouwew Dec 25, 2025
6632066
Bump to a4
bouwew Dec 25, 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/Floor",
"model_id": "106-03",
"module_id": "e71d43382a894c9e888d379368aafba9",
"name": "Tom Logeerkamer",
"sensors": {
"setpoint": 13.0,
Expand All @@ -111,6 +113,7 @@
"location": "06aecb3d00354375924f50c47af36bd2",
"model": "Tom/Floor",
"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/Floor",
"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/Floor",
"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/Floor",
"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/Floor",
"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/Floor",
"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/Floor",
"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/Floor",
"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