From 2b88c987da9f91ffdcf77808a6bee6df87bcef43 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sun, 2 Dec 2018 13:16:02 +0100 Subject: [PATCH] Fix GPIO input schema validator (#253) --- esphomeyaml/pins.py | 2 +- tests/test1.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/esphomeyaml/pins.py b/esphomeyaml/pins.py index 0734a4f8fe..e94236fa5a 100644 --- a/esphomeyaml/pins.py +++ b/esphomeyaml/pins.py @@ -268,7 +268,7 @@ GPIO_FULL_OUTPUT_PIN_SCHEMA = vol.Schema({ }) GPIO_FULL_INPUT_PIN_SCHEMA = vol.Schema({ - vol.Required(CONF_NUMBER): output_pin, + vol.Required(CONF_NUMBER): input_pin, vol.Optional(CONF_MODE): pin_mode, vol.Optional(CONF_INVERTED): cv.boolean, }) diff --git a/tests/test1.yaml b/tests/test1.yaml index d1eabb16b9..1163be485c 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -528,6 +528,11 @@ binary_sensor: format: "Multi Clicked SINGLE" level: warn id: binary_sensor1 + - platform: gpio + pin: + number: GPIO9 + mode: INPUT_PULLUP + name: "Living Room Window 2" - platform: status name: "Living Room Status" - platform: esp32_touch