Skip to content

Commit 9eeca37

Browse files
authored
Remove empty attributes and duplicate keys in diagnostics JSON (#474)
* Reduce the amount of unnecessary data in diagnostics * Regenerate diagnostics * Regenerate with correct quirks
1 parent 056bf51 commit 9eeca37

File tree

239 files changed

+11941
-290694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+11941
-290694
lines changed

tests/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ def zigpy_device_from_device_data(
397397
for attr in cluster["attributes"]:
398398
attrid = int(attr["id"], 16)
399399

400-
if attr["value"] is not None:
400+
if attr.get("value", None) is not None:
401401
real_cluster._attr_cache[attrid] = attr["value"]
402402
real_cluster.PLUGGED_ATTR_READS[attrid] = attr["value"]
403403

404-
if attr["unsupported"]:
404+
if attr.get("unsupported", False):
405405
real_cluster.unsupported_attributes.add(attrid)
406406

407407
if attr["name"] is not None:

0 commit comments

Comments
 (0)