From 1b66fa500431522648a5766ae90edc2c78fba12f Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 7 Feb 2023 12:43:30 +1300 Subject: [PATCH] Remove unneeded validation for esp32 gpio pins (#4394) --- esphome/components/esp32/gpio.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/esphome/components/esp32/gpio.py b/esphome/components/esp32/gpio.py index b97a5e0457..7848d1d552 100644 --- a/esphome/components/esp32/gpio.py +++ b/esphome/components/esp32/gpio.py @@ -123,11 +123,8 @@ def validate_gpio_pin(value): def validate_supports(value): mode = value[CONF_MODE] - is_input = mode[CONF_INPUT] is_output = mode[CONF_OUTPUT] is_open_drain = mode[CONF_OPEN_DRAIN] - is_pullup = mode[CONF_PULLUP] - is_pulldown = mode[CONF_PULLDOWN] variant = CORE.data[KEY_ESP32][KEY_VARIANT] if variant not in _esp32_validations: raise cv.Invalid(f"Unsupported ESP32 variant {variant}") @@ -138,26 +135,6 @@ def validate_supports(value): ) value = _esp32_validations[variant].usage_validation(value) - if CORE.using_arduino: - # (input, output, open_drain, pullup, pulldown) - supported_modes = { - # INPUT - (True, False, False, False, False), - # OUTPUT - (False, True, False, False, False), - # INPUT_PULLUP - (True, False, False, True, False), - # INPUT_PULLDOWN - (True, False, False, False, True), - # OUTPUT_OPEN_DRAIN - (False, True, True, False, False), - } - key = (is_input, is_output, is_open_drain, is_pullup, is_pulldown) - if key not in supported_modes: - raise cv.Invalid( - "This pin mode is not supported on ESP32 for arduino frameworks", - [CONF_MODE], - ) return value