From 4dc2b5911bd86a6a4cc9634c4e7e98a32f809938 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 16 Oct 2026 18:21:04 -1000 Subject: [PATCH] [core] Move CONF_DRIVE_STRENGTH to the shared component constants (#20975) --- esphome/components/const/__init__.py | 1 + esphome/components/esp32/gpio.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/const/__init__.py b/esphome/components/const/__init__.py index 5d900bbd5b4..966db92c6fd 100644 --- a/esphome/components/const/__init__.py +++ b/esphome/components/const/__init__.py @@ -30,6 +30,7 @@ CONF_CRC_ENABLE = "crc_enable" CONF_DATA_BITS = "data_bits" CONF_DESCRIPTION = "description" CONF_DRAW_ROUNDING = "draw_rounding" +CONF_DRIVE_STRENGTH = "drive_strength" CONF_ENABLE_OTA_DOWNGRADE_PROTECTION = "enable_ota_downgrade_protection" CONF_ENABLED = "enabled" CONF_GREEN_CHANNEL = "green_channel" diff --git a/esphome/components/esp32/gpio.py b/esphome/components/esp32/gpio.py index 7753574bc85..f81584891b6 100644 --- a/esphome/components/esp32/gpio.py +++ b/esphome/components/esp32/gpio.py @@ -5,7 +5,7 @@ from typing import Any from esphome import pins import esphome.codegen as cg -from esphome.components.const import CONF_HOLD_STATE +from esphome.components.const import CONF_DRIVE_STRENGTH, CONF_HOLD_STATE import esphome.config_validation as cv from esphome.const import ( CONF_ID, @@ -238,7 +238,6 @@ DRIVE_STRENGTHS = { } gpio_num_t = cg.global_ns.enum("gpio_num_t") -CONF_DRIVE_STRENGTH = "drive_strength" ESP32_PIN_SCHEMA = cv.All( pins.gpio_base_schema(ESP32InternalGPIOPin, gpio_pin_number_validator).extend(