Skip to content

Commit

Permalink
Fallback to wildcard subscription if no explicit subscription defined (
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt authored Jun 27, 2023
1 parent d3f8967 commit 7cdb9f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,14 @@ async def _subscribe_node(self, node_id: int) -> None:

if len(attr_subscriptions) > 50:
# prevent memory overload on node and fallback to wildcard sub if too many
# individual subscriptions
# individual subscriptions (e.g. bridges)
attr_subscriptions = "*" # type: ignore[assignment]

if node.attribute_subscriptions == []:
# temp fix for backwards compatbility with HA releases below 2023.7
# fallback to wildcard subscriptions if we have no explicit
# node subscriptions defined.
# TODO: remove this after HA release 2023.8
attr_subscriptions = "*" # type: ignore[assignment]

# check if we already have an subscription for this node,
Expand Down

0 comments on commit 7cdb9f3

Please sign in to comment.