mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
GPIO Switch add default to HIGH option
This commit is contained in:
parent
0a69de0945
commit
3b5c945c43
@ -26,6 +26,21 @@ Configuration variables:
|
||||
- **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
|
||||
^^^^^^^^
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user