From 0e540437cb6cf196d2347e2c9d835962ec2b8db1 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 16 Oct 2018 22:41:12 +0200 Subject: [PATCH] Add power on value to GPIO Switch (#55) --- esphomeyaml/components/switch/gpio.rst | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/esphomeyaml/components/switch/gpio.rst b/esphomeyaml/components/switch/gpio.rst index f6c695d4e..b371d2e63 100644 --- a/esphomeyaml/components/switch/gpio.rst +++ b/esphomeyaml/components/switch/gpio.rst @@ -23,24 +23,12 @@ Configuration variables: - **pin** (**Required**, :ref:`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 ` and :ref:`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 `: - - .. code:: yaml - - # Example configuration entry - switch: - - platform: gpio - pin: - number: 25 - inverted: True - name: "Living Room Dehumidifier" - See Also --------