esphome-docs/components/switch/output.rst

41 lines
1.0 KiB
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
Generic Output Switch
=====================
2018-11-14 22:12:27 +01:00
.. seo::
2019-02-16 23:25:23 +01:00
:description: Instructions for setting up generic output switches in ESPHome that control an output component.
:image: upload.svg
2018-11-14 22:12:27 +01:00
2018-05-13 11:37:02 +02:00
The ``output`` switch platform allows you to use any output component as a switch.
2018-06-01 18:10:00 +02:00
.. figure:: images/output-ui.png
:align: center
:width: 80.0%
2018-05-13 11:37:02 +02:00
.. code-block:: yaml
2018-05-13 11:37:02 +02:00
# Example configuration entry
output:
- platform: gpio
pin: GPIOXX
2018-05-13 11:37:02 +02:00
id: 'generic_out'
switch:
- platform: output
name: "Generic Output"
output: 'generic_out'
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
2018-05-13 11:37:02 +02:00
2018-06-01 18:10:00 +02:00
- **output** (**Required**, :ref:`config-id`): The ID of the output component to use.
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Switch <config-switch>`.
2018-06-01 18:10:00 +02:00
See Also
2018-08-24 22:44:01 +02:00
--------
2018-06-01 18:10:00 +02:00
- :doc:`/components/output/index`
2019-05-12 22:44:59 +02:00
- :apiref:`output/switch/output_switch.h`
- :ghedit:`Edit`