Remove IKEA air purifier entities now provided by zha-quirks - #865
Draft
zigpy-review-bot wants to merge 1 commit into
Draft
Remove IKEA air purifier entities now provided by zha-quirks#865zigpy-review-bot wants to merge 1 commit into
zigpy-review-bot wants to merge 1 commit into
Conversation
The STARKVIND child lock, LED, filter and run time entities are now created by the quirk, which also provides the PM2.5 sensor directly from the manufacturer specific cluster instead of a virtual PM25 cluster. The fan entity stays here and keeps the bind and reporting config for the attributes it uses.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Removes the IKEA STARKVIND air purifier entities that are now created by the quirk, as the coupled zigpy/zha-device-handlers#5248 ports the device to quirks v2.
Removed, all of them matched on the IKEA manufacturer specific cluster
0xFC7D:ReplaceFilter(binary sensor)FilterLifeTime(number)IkeaFilterRunTime,IkeaDeviceRunTime(sensors)ChildLock,DisableLed(switches)IkeaFanstays here — quirks v2 has no fan platform — but its_server_cluster_configshrinks from "every attribute of the manufacturer cluster" to justfan_modeandfan_speed. The quirk entities carry the samereporting_configvalues for the other seven attributes, andaggregate_cluster_configsmerges them, so the device still gets exactly one bind on0xFC7Dand the same nine reporting configurations with the same intervals as before.The
PM25sensor for this device is gone from the diagnostics not because it was removed here, but because the quirk no longer adds the virtualPM25cluster it used to be discovered on — it is now a quirk sensor reading the manufacturer specificair_quality_25pmattribute, with the sameunique_id. That is the actual fix for #407: ZHA used to bind and configure reporting formeasured_valueon a cluster the device does not implement, which answersUNSUPPORTED_ATTRIBUTE.The regenerated diagnostics show no entity added or removed and no
unique_idchanged. The only state change is the table model's PM2.5 sensor going from0tonull, which is correct: itsair_quality_25pmreads65535(the value is unavailable) and ZHA maps auint16's0xFFFFto unknown. The old mirror dropped any report of65535instead of passing it on, so the sensor kept whatever the virtual cluster last held —0in this dump, which is the symptom reported in zigpy/zha-device-handlers#4625.Additional information
Draft until a
zha-quirksrelease containing zigpy/zha-device-handlers#5248 exists. Merging this before that release would leave the device without those entities, and CI here can't pass either: the pin iszha-quirks>=2.0.0, sotests/test_fan.pyand the two STARKVINDtest_discoversnapshots only pass against the new quirk. The minimum needs bumping to that release in this PR before it is merged.The other ordering is safe: releasing the quirks side first does not duplicate anything.
Device._add_pending_entitiesignores a pending entity whose(platform, unique_id)is already taken, so ZHA's own classes simply keep precedence for the six duplicated ids until this lands. I verified that by regenerating the diagnostics against an unmodifieddevwith the new quirk installed — same twelve entities, same unique_ids, and the PM2.5 sensor already comes from the quirk (ZHA'sPM25class no longer matches, since the cluster it matched on is gone). So zigpy/zha-device-handlers#5248 fixes #407 on its own.