Skip to content

Commit

Permalink
Allow writing null to attributes (fixes #434) (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
joebandenburg authored Nov 21, 2023
1 parent 9aeb457 commit f782756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ async def write_attribute(
raise RuntimeError("Device Controller not initialized.")
endpoint_id, cluster_id, attribute_id = parse_attribute_path(attribute_path)
attribute = ALL_ATTRIBUTES[cluster_id][attribute_id]()
attribute.value = value
attribute.value = Clusters.NullValue if value is None else value
return await self.chip_controller.WriteAttribute(
nodeid=node_id,
attributes=[(endpoint_id, attribute)],
Expand Down

0 comments on commit f782756

Please sign in to comment.