home-assistant.io/source/components/switch.command_switch.markdown
2015-06-13 10:04:59 -07:00

690 B

layout, title, description, date, sidebar, comments, sharing, footer
layout title description date sidebar comments sharing footer
page Command line switches support Instructions how to have a switch call command line commands. 2015-06-10 22:41 false false true true

A switch platform that issues specific commands when it is turned on and off. This might very well become our most platform as it allows anyone to integrate any type of switch into Home Assistant that can be controlled from the command line, including calling other scripts!

# Example configuration.yaml entry
switch:
  platform: command_switch
  switches:
    - kitchen_light:
        oncmd: switch_command on kitchen
        offcmd: switch_command off kitchen