From 301fe23ef72a671fa9d4b8022d65cfe9668d47c9 Mon Sep 17 00:00:00 2001 From: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com> Date: Wed, 27 Jan 2021 06:15:26 -0300 Subject: [PATCH] Add documentation for remote.delete_command in the Broadlink integration (#15850) --- source/_integrations/broadlink.markdown | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/source/_integrations/broadlink.markdown b/source/_integrations/broadlink.markdown index 9d2d4c303c3..a2323fdef0e 100644 --- a/source/_integrations/broadlink.markdown +++ b/source/_integrations/broadlink.markdown @@ -260,6 +260,51 @@ script: - b64:JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA= ``` +### Deleting commands + +You can use `remote.delete_command` to remove commands that you've learned with the `remote.learn_command` service. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ------------------------------------- | +| `entity_id` | no | ID of the remote. | +| `device` | no | Name of the device. | +| `command` | no | Names of the commands to be deleted. | + +#### Deleting a command + +To delete a command, call `remote.delete_command` with the device name and the command to be deleted: + +```yaml +# Example configuration.yaml entry +script: + delete_tv_power: + sequence: + - service: remote.delete_command + data: + entity_id: remote.bedroom + device: television + command: power +``` + +#### Deleting multiple commands + +You can provide a list of commands to be deleted: + +```yaml +# Example configuration.yaml entry +script: + delete_tv_commands: + sequence: + - service: remote.delete_command + data: + entity_id: remote.bedroom + device: television + command: + - power + - source + - menu +``` + ## Sensor The `sensor` entities allow you to monitor Broadlink sensors. These entities are created automatically when you configure a device that has sensors.