mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
adds gpio INPUT_OUTPUT_OPEN_DRAIN (#4360)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -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])
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user