Follow-ups from the #884 review: override discard logging, quirk-provided test config, DEFAULT test fixture
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start with aggregate_cluster_configs in zha/zigbee/cluster_config.py around line 119, where attr_name and the cluster are available, and compare the aggregate before and after the merge to log discarded overrides; a prototype commit is referenced in the issue. For the test side, DEFAULT in tests/test_cluster_config.py (line 23) should be replaced by asserting configured[em_attrs.active_power] != RELAXED. The QuirkBuilder change is blocked on a zhaquirks release, so leave that for later. Done means the discard is logged and the test no longer pins ZHA's built-in default.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Tracking the inline review comments from #884 that were deliberately deferred rather than addressed in that PR. Filed at TheJulianJES's request (https://github.com/zigpy/zha/pull/884#discussion_r3919402668). All three still apply on dev at 66603431. The one genuine bug from that review is filed separately.
1. Log when an entity's reporting config is discarded by an override
https://github.com/zigpy/zha/pull/884#discussion_r3910746401
Whether an override wins depends on which entities happened to be discovered, and the discard is otherwise invisible: ClusterConfigureReportingEvent carries only the final result, so "why did this device's voltage reporting get slower after an update" has no answer in a normal ZHA debug log and no way to attribute it to a particular entity.
AggregatedAttrConfig.merge does not know the attribute name, so this wants either the name passed in or the log placed at the aggregate_cluster_configs call site (zha/zigbee/cluster_config.py:119), which already has attr_name and the cluster and can compare the aggregate before and after the merge.
TheJulianJES prototyped it as 66044f4ffbfba5ba8cea487f471448922b515ce5 and left it out of #884.
2. Switch the override test to a real QuirkBuilder-provided config
https://github.com/zigpy/zha/pull/884#discussion_r3910699558
test_cluster_config.py patches ElectricalMeasurementRMSCurrent._server_cluster_config to simulate a device-specific override. TheJulianJES's note: this should become a quirks QuirkBuilder actually providing the override config, which needs the zhaquirks bump, which needs a ZHA release containing #884. Patching internals was accepted as the interim.
3. DEFAULT in test_cluster_config.py silently pins ZHA's built-in active_power config
https://github.com/zigpy/zha/pull/884#discussion_r3910746384
DEFAULT = ReportingConfig(min_interval=5, max_interval=900, reportable_change=1) (tests/test_cluster_config.py:23) is not a free-standing fixture — the final assertion configured[em_attrs.active_power] == DEFAULT only holds because it duplicates what ElectricalMeasurementActivePower._server_cluster_config declares for active_power (zha/application/platforms/sensor/init.py:1074-1079). Still identical on dev.
That reportable_change=1 is exactly what the divisor-aware EM reporting follow-up changes, so this assertion will fail on that PR for a reason unrelated to what the test is about. The test's real subject is that the override did not leak to attributes that did not ask for it, which assert configured[em_attrs.active_power] != RELAXED states without pinning the default.
Low priority — it fails loudly and is a one-line fix — but worth knowing before the divisor-aware change lands.
- 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