Improve documentation of homeworks.send_command (#32164)

This commit is contained in:
Erik Montnemery 2024-04-22 10:31:42 +02:00 committed by GitHub
parent bac512e3e3
commit 490ae17ee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,4 +38,18 @@ Send a custom command to the Lutron Homeworks controller.
| Service data attribute | Optional | Example | Description |
| ---------------------- | -------- | ----------------------- | --------------------------------------------------- |
| `controller_id` | No | `homeworks` | The controller to which the command should be sent to. |
| `command` | No | `KBP, [02:08:02:01], 1` | The command you want to send. This can either be a single command or a list of commands. |
| `command` | No | `KBP, [02:08:02:01], 1` | The command you want to send. This can either be a single command or a list of commands. In addition to the [commands supported by the controller](https://assets.lutron.com/a/documents/hwi%20rs232%20protocol.pdf), the special command `DELAY <ms>` is supported, where ms is the number of milliseconds to sleep. |
#### Sending a list of commands
The example shows how to send `KBP`, wait 0.5 seconds, then send `KBR` to simulate a keypad button keypress with a duration of a half second.
```yaml
service: homeworks.send_command
data:
controller_id: "homeworks"
command:
- "KBP, [02:08:02:01], 1"
- "DELAY 500"
- "KBR, [02:08:02:01], 1"
```