IKEA lights stop mid-transition when ZHA sends a redundant color command after the level command
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- embedded-iot
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 96
- Fork
- 84
- Merge medio
- 2g 4h
- PR unite (30g)
- 30
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di zigpy/zha
-
Device override creates the generic entity instead of the vendor-specific one (Light instead of HueLight, ForceOnLight, MinTransitionLight)Forse già presa @zigpy-review-bot l’ha presa oggi. Apertabot: code audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Each time a device becomes available again, ZHA adds another firmware update listener that is never releasedForse già presa @zigpy-review-bot l’ha presa 1 giorno fa. Apertabot: code audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Devices that left the network are re-initialized on every availability check, reading attributes from a device that is goneForse già presa @zigpy-review-bot l’ha presa 1 giorno fa. Apertabot: code audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
device specific quirks
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pimutils/vdirsyncer#1242 ·
-
priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
QuantConnect/lean-cli#792 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-webui/open-webui#35360 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100