From 6911639617b9857adc06d424b25b1d92b4a0ae91 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 5 Dec 2022 19:46:00 +1300 Subject: [PATCH] Fix board pin alias lookup (#4147) --- esphome/components/esp32/gpio.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/components/esp32/gpio.py b/esphome/components/esp32/gpio.py index 518514a6a3..0c46bc9801 100644 --- a/esphome/components/esp32/gpio.py +++ b/esphome/components/esp32/gpio.py @@ -108,6 +108,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