Update docsstring
This commit is contained in:
parent
b0b88e606c
commit
40aa661340
1 changed files with 31 additions and 1 deletions
|
@ -2,8 +2,38 @@
|
||||||
"""
|
"""
|
||||||
homeassistant.components.switch.command_switch
|
homeassistant.components.switch.command_switch
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Allows to configure custom shell commands to turn a switch on/off.
|
Allows to configure custom shell commands to turn a switch on/off.
|
||||||
|
|
||||||
|
Configuration:
|
||||||
|
|
||||||
|
To use the command_line switch you will need to add something like the
|
||||||
|
following to your configuration.yaml file.
|
||||||
|
|
||||||
|
switch:
|
||||||
|
platform: command_switch
|
||||||
|
switches:
|
||||||
|
name_of_the_switch:
|
||||||
|
oncmd: switch_command on for name_of_the_switch
|
||||||
|
offcmd: switch_command off for name_of_the_switch
|
||||||
|
|
||||||
|
Variables:
|
||||||
|
|
||||||
|
These are the variables for the switches array:
|
||||||
|
|
||||||
|
name_of_the_switch
|
||||||
|
*Required
|
||||||
|
Name of the command switch. Multiple entries are possible.
|
||||||
|
|
||||||
|
oncmd
|
||||||
|
*Required
|
||||||
|
The action to take for on.
|
||||||
|
|
||||||
|
offcmd
|
||||||
|
*Required
|
||||||
|
The action to take for off.
|
||||||
|
|
||||||
|
For more details about this platform, please refer to the documentation at
|
||||||
|
https://home-assistant.io/components/switch.command_switch.html
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from homeassistant.components.switch import SwitchDevice
|
from homeassistant.components.switch import SwitchDevice
|
||||||
|
|
Loading…
Add table
Reference in a new issue