mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Skip validation of defined pins (#3999)
This commit is contained in:
parent
3e110681c9
commit
291deb12ad
1 changed files with 6 additions and 0 deletions
|
@ -105,6 +105,12 @@ _esp32_validations = {
|
|||
|
||||
def validate_gpio_pin(value):
|
||||
value = _translate_pin(value)
|
||||
board = CORE.data[KEY_ESP32][KEY_BOARD]
|
||||
board_pins = boards.ESP32_BOARD_PINS.get(board, {})
|
||||
|
||||
if value in board_pins.values():
|
||||
return value
|
||||
|
||||
variant = CORE.data[KEY_ESP32][KEY_VARIANT]
|
||||
if variant not in _esp32_validations:
|
||||
raise cv.Invalid(f"Unsupported ESP32 variant {variant}")
|
||||
|
|
Loading…
Reference in a new issue