Skip to content

Commit

Permalink
Make sure diagnostic data is output in deterministic order ZHA (home-…
Browse files Browse the repository at this point in the history
…assistant#123551)

Make sure diagnostic data is output in deterministic order

Sets are not ordered, so the tests for this failed sporadically since it is
converted into a list when converted to json.
  • Loading branch information
elupus authored Aug 10, 2024
1 parent f53da62 commit f695075
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/zha/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,7 @@ def get_cluster_attr_data(cluster: Cluster) -> dict:
}
for attr_id, attr_def in cluster.attributes.items()
},
UNSUPPORTED_ATTRIBUTES: cluster.unsupported_attributes,
UNSUPPORTED_ATTRIBUTES: sorted(
cluster.unsupported_attributes, key=lambda v: (isinstance(v, str), v)
),
}

0 comments on commit f695075

Please sign in to comment.