mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-10 10:56:28 +00:00
Add documentation for the remote.delete_command service (#763)
This commit is contained in:
parent
9913c46891
commit
c72638907f
@ -16,7 +16,8 @@ Properties should always only return information from memory and not do I/O (lik
|
|||||||
|
|
||||||
| Constant | Description
|
| Constant | Description
|
||||||
| -------- | -----------
|
| -------- | -----------
|
||||||
| `SUPPORT_LEARN_COMMAND` | Entity allows learning commands from devices.
|
| `SUPPORT_LEARN_COMMAND` | Entity allows learning commands from devices.
|
||||||
|
| `SUPPORT_DELETE_COMMAND` | Entity allows deleting commands from devices.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@ -45,3 +46,17 @@ class MyRemote(RemoteEntity):
|
|||||||
async def async_learn_command(self, **kwargs):
|
async def async_learn_command(self, **kwargs):
|
||||||
"""Learn a command from a device."""
|
"""Learn a command from a device."""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Delete Command
|
||||||
|
|
||||||
|
Only implement this method if the flag `SUPPORT_DELETE_COMMAND` is set.
|
||||||
|
|
||||||
|
```python
|
||||||
|
class MyRemote(RemoteEntity):
|
||||||
|
|
||||||
|
def delete_command(self, **kwargs):
|
||||||
|
"""Delete a command from a device."""
|
||||||
|
|
||||||
|
async def async_delete_command(self, **kwargs):
|
||||||
|
"""Delete a command from a device."""
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user