IKEA lights stop mid-transition when ZHA sends a redundant color command after the level command
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- embedded-iot
Research direction
Start in zha/application/platforms/light/init.py, where new_color_provided_while_off is computed and async_handle_color_commands sends the color command after the level command. Reproducing needs IKEA bulbs and a Zigbee coordinator, so trace the command ordering in the logs instead. Done means the redundant color command is skipped when the color matches the current one in the same mode, with the level transition reaching target on all bulbs.
Written by the indexing model from the issue text.
Description
Setup
- Home Assistant 2026.11.2, ZHA (zigpy-znp), coordinator CC2674P10 (SLZB-MR4U)
- 3× IKEA TRÅDFRI bulb GU10 CWS 345lm, switched individually (unicast)
- ZHA options: default light transition = 1 s, "Enhanced light transition from an off-state" = on
What happens
Turning the lights on from off with brightness: 204 and color_temp_kelvin: 3000, while all three bulbs are already at 333 mireds (color temperature mode), ZHA sends:
19:18:46.872 move_to_level_with_on_off(level=204, transition_time=10)
19:18:47.044 move_to_color_temp(color_temp_mireds=333, transition_time=10) ← 0.15–0.5 s later
All commands are acknowledged with SUCCESS. But the bulbs abort the level transition when the color command arrives, and stay at an intermediate level. Reported current_level after the transition (target 204):
| switch-on | bulb A | bulb B | bulb C |
|---|---|---|---|
| 19:18:46 | 41 | 41 | 82 |
| 19:19:00 | 102 | 41 | 41 |
| 19:19:13 | 143 | 61 | 122 |
With transition 0, all bulbs reach 204 every time.
What works
- Color actually changes (e.g. it was set to an XY color before): the enhanced off-state path kicks in. ZHA turns on at minimum level, sets the color, then moves to the level. All bulbs reach 204.
- Only the level is sent (we stopped sending the unchanged color from our side):
move_to_level_with_on_off(204, 10)alone. All bulbs fade cleanly to 204.
Why
In zha/application/platforms/light/__init__.py, new_color_provided_while_off is only true if the color differs from the current one. So with an unchanged color, the enhanced path is skipped. async_handle_color_commands then still sends the color command right after the level command, with the same transition, while the level transition is still running.
IKEA WS/CWS bulbs are known to freeze for the duration of a transition after a color command and to drop or abort other commands during that time. Zigbee2MQTT works around this for all IKEA WS/CWS lights: zigbee-herdsman-converters src/lib/ikea.ts, trackFreezing / unfreeze_support (on by default), which sends genLevelCtrl stop before the next command while a light is marked as frozen (Koenkk/zigbee2mqtt#18574). Related reports: home-assistant/core#117604, and several community threads ("Light transition not working. IKEA Tradfri", "simultaneous brightness + color transition workaround").
Suggestions
- Don't send the color command when the requested color equals the current one in the same color mode. That alone fixed the common switch-on case for us.
- Optionally, port the Z2M IKEA unfreeze handling (track
frozenUntilper light or group, sendstopbefore the next command).
Debug logs (redacted) are available on request.
- Dominant language
- Python
- Stars
- 96
- Forks
- 84
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from zigpy/zha
-
Device override creates the generic entity instead of the vendor-specific one (Light instead of HueLight, ForceOnLight, MinTransitionLight)Possibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Each time a device becomes available again, ZHA adds another firmware update listener that is never releasedPossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Devices that left the network are re-initialized on every availability check, reading attributes from a device that is gonePossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
device specific quirks
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pimutils/vdirsyncer#1242 ·
-
priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
QuantConnect/lean-cli#792 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-webui/open-webui#35360 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100