Follow the origin removal and colour light wire changes #127

Merged
rob merged 4 commits from refactor/colour-light-no-origin into main 2026-10-13 20:33:30 +00:00
Collaborator

Follows two breaking firmware wire changes (CCS-HA-61). Firmware #116 removed the origin byte and the manual lockout byte, so the codecs, lockout attributes, ORIGIN constants and bench transcription are gone, and Spec section citations are renumbered (old 9.x shifts down one). Firmware #107 turns the CCT light into a colour light: CMD_COLOUR / STATE_COLOUR, presented as PK_COLOUR. The HA light now drives brightness, colour temperature and HS colour through CMD_COLOUR, and on/off through CMD_SWITCH. Asking for a colour temperature sends saturation 0, so the light is white at that temperature.

The shared vectors are taken from firmware main, which now includes #107.

Tested: ruff, mypy and the full suite pass locally (1314 passed, 3 skipped).

Follows two breaking firmware wire changes (CCS-HA-61). Firmware #116 removed the origin byte and the manual lockout byte, so the codecs, lockout attributes, ORIGIN constants and bench transcription are gone, and `Spec section` citations are renumbered (old 9.x shifts down one). Firmware #107 turns the CCT light into a colour light: `CMD_COLOUR` / `STATE_COLOUR`, presented as `PK_COLOUR`. The HA light now drives brightness, colour temperature and HS colour through `CMD_COLOUR`, and on/off through `CMD_SWITCH`. Asking for a colour temperature sends saturation 0, so the light is white at that temperature. The shared vectors are taken from firmware main, which now includes #107. Tested: ruff, mypy and the full suite pass locally (1314 passed, 3 skipped).
Drive the colour light through CMD_COLOUR and expose HS colour
Some checks failed
Lint, type check and test / quality (pull_request) Failing after 23s
Lint, type check and test / hassfest (pull_request) Successful in 23s
Lint, type check and test / release (pull_request) Has been skipped
91a900890b
Claude left a comment

Offsets in catalogue.py and frame_bench match the kitchen-cct spec. Findings below.

Offsets in catalogue.py and frame_bench match the kitchen-cct spec. Findings below.
@ -70,0 +123,4 @@
"""Asking for a colour temperature also takes the light out of any hue it was in."""
changes: dict[str, int] = {}
if ATTR_BRIGHTNESS in kwargs:
changes["brightness"] = round(kwargs[ATTR_BRIGHTNESS] * 100 / FULL_BRIGHTNESS)
Author
Collaborator

Brightness 1 to 2 of 255 rounds to 0 %, so a dim request on a colour light sends brightness 0. Clamp to at least 1 when a brightness was asked for. No test covers the low end.

Brightness 1 to 2 of 255 rounds to 0 %, so a dim request on a colour light sends brightness 0. Clamp to at least 1 when a brightness was asked for. No test covers the low end.
Author
Collaborator

Stale "9.5" in the docstring. Should be 9.4. Also line 1774 still says "as a remote request", which no longer means anything.

Stale "9.5" in the docstring. Should be 9.4. Also line 1774 still says "as a remote request", which no longer means anything.
Author
Collaborator

Still cites "spec section 9.5". The sequence counter is 9.4 now.

Still cites "spec section 9.5". The sequence counter is 9.4 now.
Keep a dim colour light request above zero and fix stale citations
Some checks failed
Lint, type check and test / hassfest (pull_request) Successful in 8s
Lint, type check and test / quality (pull_request) Failing after 20s
Lint, type check and test / release (pull_request) Has been skipped
11a6d9e248
Take the vectors from firmware main now that #107 has landed
All checks were successful
Lint, type check and test / hassfest (pull_request) Successful in 16s
Lint, type check and test / quality (pull_request) Successful in 2m7s
Lint, type check and test / release (pull_request) Has been skipped
7f9e7741f1
rob merged commit e3c138a255 into main 2026-10-13 20:33:30 +00:00
rob deleted branch refactor/colour-light-no-origin 2026-10-13 20:33:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rob/CampervanHomeAssistant!127
No description provided.