Skip to content

fix: white mode instead of colour temperature for single-white unified lamps - #122

Merged
8none1 merged 1 commit into
mainfrom
fix/mini-rgbw-white-mode
Nov 10, 2026
Merged

8none1 merged 1 commit into
mainfrom
fix/mini-rgbw-white-mode

Conversation

@8none1

@8none1 8none1 commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Refs #121 (colour temperature part only; the effect speed read-back is still waiting on a log).

The Sunset Lamp (product 39, Ctrl_Mini_RGBW) has one fixed warm-white channel. set_color_temp already forced temp_pct = 0 for it, so 2700K and 6500K sent identical bytes, but the light still offered a 2700 to 6500K range.

Changes:

  • device.py: new has_fixed_white (uses_color_v2, warm-white channel, no cool-white channel). has_color_temp returns False for these. set_white() also handles them, sending the 0x3B 0xB1 frame (temp 0%) that the lamp already acknowledges as white mode (0x31 on BLE older than v5). State frames and adverts set white_mode and no longer set a kelvin value.
  • light.py: these lamps offer ColorMode.WHITE instead of COLOR_TEMP. white: and brightness changes in white mode reuse the iotbt: white mode for product 170 (#114) #117 code.

Other devices: only product 39 sets uses_color_v2 with a warm-white-only channel. Products 4, 6, 32, 38 and 72 are warm-white-only but unchanged (tested). Product 39 users lose the colour temperature slider and gain a white mode; the lamp output is the same.

Tests: new tests/test_fixed_white.py uses the frames from the debug log in #75, including the exact white command. Suite: 45 passed.

Not verified on hardware. No version bump in this PR.

🤖 Generated with Claude Code

…d lamps (#121)

Product 39 (Sunset Lamp) has one fixed warm-white channel, and the code
already forced temp 0% for it, so 2700K and 6500K sent identical bytes
while the light still offered a colour temperature range.

Products with uses_color_v2, a warm-white channel and no cool-white
channel now offer ColorMode.WHITE (brightness only) instead of
COLOR_TEMP. The white command is the 0x3B 0xB1 frame the lamp already
acknowledges as white mode, and state frames and adverts track it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@8none1
8none1 merged commit 14cd65d into main Nov 10, 2026
6 checks passed
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.

1 participant