Add power on value to GPIO Switch (#55)

This commit is contained in:
Otto Winter 2018-10-16 22:41:12 +02:00 committed by GitHub
parent c978bdc81e
commit 0e540437cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,24 +23,12 @@ Configuration variables:
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The
GPIO pin to use for the switch.
- **name** (**Required**, string): The name for the switch.
- **power_on_value** (*Optional*, boolean): The state this switch should be initialized with on boot.
Please note that certain pins can have pull-up/down resistors that activate/deactivate a pin before
esphomelib can initialize them. Please check with a multimeter and use another pin if necessary.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
.. note::
If you want the pin to default to HIGH on startup, you can use the inverted property
of the :ref:`Pin Schema <config-pin_schema>`:
.. code:: yaml
# Example configuration entry
switch:
- platform: gpio
pin:
number: 25
inverted: True
name: "Living Room Dehumidifier"
See Also
--------