diff --git a/esphome/pins.py b/esphome/pins.py index 2b3adce86d..2ac4cd4b54 100644 --- a/esphome/pins.py +++ b/esphome/pins.py @@ -49,6 +49,11 @@ def _set_mode(value, default_mode): CONF_INPUT: True, CONF_PULLDOWN: True, }, + "INPUT_OUTPUT_OPEN_DRAIN": { + CONF_INPUT: True, + CONF_OUTPUT: True, + CONF_OPEN_DRAIN: True, + }, } if mode.upper() not in PIN_MODES: raise cv.Invalid(f"Unknown pin mode {mode}", [CONF_MODE]) diff --git a/tests/test1.yaml b/tests/test1.yaml index abbfe8adec..a567c41f2a 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -1321,6 +1321,11 @@ binary_sensor: number: GPIO9 mode: INPUT_PULLUP name: Living Room Window 2 + - platform: gpio + pin: + number: GPIO9 + mode: INPUT_OUTPUT_OPEN_DRAIN + name: Living Room Button - platform: status name: Living Room Status - platform: esp32_touch