fix(ha): pair a cover's step/stop within its ETS Function, never across it (issue #11)

generate_ha_package cross-wired move_short_address across unrelated ETS
Functions sharing a zone token (a window and an awning both 'Room A'), and
could leave a cover with no step/stop. Pair siblings by ETS Function
membership (authoritative); a sibling owned by a different function is never
borrowed. Falls back to the existing name-token logic only when the move GA
has no function, so projects without ETS Functions are unchanged.

Adds tests/test_cover_pairing.py (reproduces the field case from #11, fails
without the fix) and wires it into CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nikolay Miroshnichenko
2026-08-27 11:01:54 +02:00
co-authored by Claude Opus 4.8
parent b38c25675a
commit dd8ecac090
3 changed files with 153 additions and 3 deletions
+3
View File
@@ -40,6 +40,9 @@ jobs:
- name: v0.8 fixes (positional pairing, ref-merge, range names)
run: python tests/test_v08_fixes.py
- name: Cover step/stop pairing stays within the ETS Function (issue #11)
run: python tests/test_cover_pairing.py
- name: Console script is installed
run: |
python -c "import importlib.metadata as m; print('entry points:', [e.name for e in m.entry_points(group='console_scripts') if e.name == 'nickol-knx-mcp'])"