mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +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:
parent
d3627f0972
commit
393ca64d70
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue