esphome-docs/esphomeyaml/components/switch/index.rst

56 lines
2.0 KiB
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
Switch Component
================
The ``switch`` domain includes all platforms that should show up like a
switch and can only be turned ON or OFF.
Currently supported switch platforms:
======================== ======================== ========================
|GPIO Switch|_ |IR Transmitter|_ |Restart Switch|_
------------------------ ------------------------ ------------------------
`GPIO Switch`_ `IR Transmitter`_ `Restart Switch`_
------------------------ ------------------------ ------------------------
|Shutdown Switch|_ |Output Switch|_
------------------------ ------------------------ ------------------------
`Shutdown Switch`_ `Output Switch`_
======================== ======================== ========================
2018-05-17 16:16:50 +02:00
.. |GPIO Switch| image:: /esphomeyaml/images/pin.svg
2018-05-13 11:37:02 +02:00
:class: component-image
.. _GPIO Switch: /esphomeyaml/components/switch/gpio.html
2018-05-17 16:16:50 +02:00
.. |IR Transmitter| image:: /esphomeyaml/images/remote.svg
2018-05-13 11:37:02 +02:00
:class: component-image
.. _IR Transmitter: /esphomeyaml/components/switch/ir_transmitter.html
2018-05-17 16:16:50 +02:00
.. |Restart Switch| image:: /esphomeyaml/images/restart.svg
2018-05-13 11:37:02 +02:00
:class: component-image
.. _Restart Switch: /esphomeyaml/components/switch/restart.html
2018-05-17 16:16:50 +02:00
.. |Shutdown Switch| image:: /esphomeyaml/images/power.svg
2018-05-13 11:37:02 +02:00
:class: component-image
.. _Shutdown Switch: /esphomeyaml/components/switch/shutdown.html
2018-05-17 16:16:50 +02:00
.. |Output Switch| image:: /esphomeyaml/images/upload.svg
2018-05-13 11:37:02 +02:00
:class: component-image
.. _Output Switch: /esphomeyaml/components/switch/output.html
Base Switch Configuration
-------------------------
.. code:: yaml
switch:
- platform: ...
name: "Switch Name"
icon: "mdi:restart"
Configuration variables:
- **name** (**Required**, string): The name of the switch.
- **icon** (*Optional*, icon): Manually set the icon to use for the
sensor in the frontend.
- All other options from `MQTT
Component </esphomeyaml/components/mqtt.html#mqtt-component-base-configuration>`__.