Fix ZHA startup failure with the Konke button (#92144)
* Ensure devices with bad cluster subclasses do not prevent startup * Explicitly unit test an affected SML001 device * Do not use invalid `hue_occupancy` attribute name * Actually remove `hue_occupancy` * Bump ZHA dependencies
This commit is contained in:
parent
cdbffee781
commit
9d0dd0b784
9 changed files with 198 additions and 11 deletions
|
@ -240,6 +240,15 @@ def zigpy_device_mock(zigpy_app_controller):
|
|||
):
|
||||
common.patch_cluster(cluster)
|
||||
|
||||
if attributes is not None:
|
||||
for ep_id, clusters in attributes.items():
|
||||
for cluster_name, attrs in clusters.items():
|
||||
cluster = getattr(device.endpoints[ep_id], cluster_name)
|
||||
|
||||
for name, value in attrs.items():
|
||||
attr_id = cluster.find_attribute(name).id
|
||||
cluster._attr_cache[attr_id] = value
|
||||
|
||||
return device
|
||||
|
||||
return _mock_dev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue