Skip to content

Lync cleanup and a zone-name cache - #7

Open
theharshl wants to merge 7 commits into
hikirsch:mainfrom
theharshl:up/l1
Open

Lync cleanup and a zone-name cache#7
theharshl wants to merge 7 commits into
hikirsch:mainfrom
theharshl:up/l1

Conversation

@theharshl

Copy link
Copy Markdown

kingfetty's Lync work reaches for a couple of command codes through hasattr with hardcoded fallbacks, because the constants didn't exist yet. This promotes them to real constants and drops the guards, adds an abstract async_set_balance declaration so both clients agree on the interface, and removes the dangling .lync_clone submodule reference that breaks a clean checkout.

It also adds get_zone_name() backed by its own _zone_names cache, kept separate from the source-name cache. The integration needs it to show controller-assigned zone names.

Depends on PR #5 and PR #4 — this branch is based on them, so their commits appear in the diff until they merge.

Tests: 157 passing.


Part of the fork-upstreaming stack — see hikirsch/htd-home-assistant#34. Please merge with a plain merge commit so the rest of the stack stays intact.

kingfetty and others added 7 commits March 27, 2026 00:43
…and Lync clients, data models, constants, and tests.
- Update MCA bass/treble/balance range to -12..12
- Enforce step size of 4 for bass/treble and 6 for balance
- Remove scaling logic from client and HA integration
- Add unit tests for MCA audio control logic and rounding
- Bump version to 0.0.26
…ance declaration

SET_ECHO_COMMAND_CODE and QUERY_ID_CODE are already defined in constants.py — drop the defensive hasattr ternaries in lync_client.py. Also add the missing @AbstractMethod declaration for async_set_balance in base_client.py alongside async_set_bass and async_set_treble.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Populate _zone_names on every ZONE_NAME_RECEIVE_COMMAND regardless of
whether zone_data exists yet. Expose get_zone_name(zone) -> str | None
mirroring get_source_name(). Also initialize _zone_names in async_connect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… cache tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants