mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 23:41:45 +01:00
Fix board pin alias lookup (#4147)
This commit is contained in:
parent
de352c1609
commit
dfcccda69e
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ def validate_gpio_pin(value):
|
|||
board = CORE.data[KEY_ESP32][KEY_BOARD]
|
||||
board_pins = boards.ESP32_BOARD_PINS.get(board, {})
|
||||
|
||||
# Resolved aliased board pins (shorthand when two boards have the same pin configuration)
|
||||
while isinstance(board_pins, str):
|
||||
board_pins = boards.ESP32_BOARD_PINS[board_pins]
|
||||
|
||||
if value in board_pins.values():
|
||||
return value
|
||||
|
||||
|
|
Loading…
Reference in a new issue