Skip to content

Commit 0decc07

Browse files
committed
Update documentation to mention kwargs argument
1 parent fa2e274 commit 0decc07

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ ZHA Toolkit can also:
9898
- [`zcl_cmd` Example: "Store Scene"](#zcl_cmd-example-store-scene)
9999
- [`zcl_cmd` Example: "Recall Scene"](#zcl_cmd-example-recall-scene)
100100
- [`zcl_cmd` Example: "Add Scene"](#zcl_cmd-example-add-scene)
101+
- [`zcl_cmd` Example: Pass keyword arguments](#zcl_cmd-example-pass-keyword-arguments)
101102
- [Group related services](#group-related-services)
102103
- [`add_group`](#add_group)
103104
- [`get_groups`](#get_groups)
@@ -1422,6 +1423,24 @@ ZigBee Cluster Library Frame
14221423
Extension Set: 06000101
14231424
```
14241425

1426+
### `zcl_cmd` Example: Pass keyword arguments
1427+
1428+
`kwargs` allows passing arbitrary keyword arguments to the underlying ZHA
1429+
cluster command handler. For instance, this enables sending an IR remote
1430+
code to the cluster command handler in the Tuya TS1201 quirk (see
1431+
https://github.com/ferehcarb/zha-device-handlers/blob/fd90c398bd746df22a5cd55e53cd3134fbd7e009/zhaquirks/tuya/ts1201.py#L125).
1432+
1433+
```yaml
1434+
action: zha_toolkit.zcl_cmd
1435+
metadata: {}
1436+
data:
1437+
ieee: switch.ir_blaster_switch
1438+
cluster: 57348
1439+
cmd: 2
1440+
kwargs:
1441+
code: BXcjrhE/AuATAQF+BuAVA8AB4Acn4AMBQBvgBwFAE8ADB92ZdyPMCD8C
1442+
```
1443+
14251444
## Group related services
14261445

14271446
### `add_group`

0 commit comments

Comments
 (0)