|
15 | 15 |
|
16 | 16 | from chip.clusters import Attribute, Objects as Clusters
|
17 | 17 | from chip.clusters.Attribute import AttributeWriteResult
|
| 18 | +from chip.discovery import FilterType |
18 | 19 | from chip.exceptions import ChipStackError
|
19 | 20 |
|
20 | 21 | from ..common.errors import (
|
|
30 | 31 | CommissioningParameters,
|
31 | 32 | DeviceProxyWrapper,
|
32 | 33 | )
|
33 |
| - from chip.discovery import DiscoveryType, FilterType |
| 34 | + from chip.discovery import DiscoveryType |
34 | 35 | from chip.native import PyChipError
|
35 | 36 |
|
36 | 37 | from .server import MatterServer
|
@@ -119,13 +120,13 @@ async def commission_on_network(
|
119 | 120 | self,
|
120 | 121 | node_id: int,
|
121 | 122 | setup_pin_code: int,
|
122 |
| - disc_filter_type: FilterType, |
123 |
| - disc_filter: Any, |
| 123 | + disc_filter_type: FilterType = FilterType.NONE, |
| 124 | + disc_filter: Any = None, |
124 | 125 | ) -> PyChipError:
|
125 | 126 | """Commission a device on the network."""
|
126 | 127 | return await self._call_sdk(
|
127 | 128 | self._chip_controller.CommissionOnNetwork,
|
128 |
| - nodeid=node_id, |
| 129 | + nodeId=node_id, |
129 | 130 | setupPinCode=setup_pin_code,
|
130 | 131 | filterType=disc_filter_type,
|
131 | 132 | filter=disc_filter,
|
@@ -230,7 +231,11 @@ async def read_attribute(
|
230 | 231 | report_interval: tuple[int, int] | None = None,
|
231 | 232 | fabric_filtered: bool = True,
|
232 | 233 | auto_resubscribe: bool = True,
|
233 |
| - ) -> Attribute.SubscriptionTransaction | Any | None: |
| 234 | + ) -> ( |
| 235 | + Attribute.SubscriptionTransaction |
| 236 | + | Attribute.AsyncReadTransaction.ReadResponse |
| 237 | + | None |
| 238 | + ): |
234 | 239 | """Read an attribute on a node."""
|
235 | 240 | async with self._get_node_lock(node_id):
|
236 | 241 | result = await self._chip_controller.Read(
|
|
0 commit comments