From 4d4ba5a1bcb2c1bd62b88ac63bae73f6379ef746 Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Mon, 19 Oct 2026 14:37:35 +1100 Subject: [PATCH] [core] Move CONF_MAX_PACKET_SIZE to components/const (#21102) Co-authored-by: Claude Opus 5.5 --- esphome/components/const/__init__.py | 1 + esphome/components/usb_host/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/const/__init__.py b/esphome/components/const/__init__.py index c2ae1a1a87b..a15df707e60 100644 --- a/esphome/components/const/__init__.py +++ b/esphome/components/const/__init__.py @@ -47,6 +47,7 @@ CONF_LABEL = "label" CONF_LIBRETINY = "libretiny" CONF_LOOP = "loop" CONF_MANUFACTURER = "manufacturer" +CONF_MAX_PACKET_SIZE = "max_packet_size" CONF_NOX_INDEX = "nox_index" CONF_ON_PACKET = "on_packet" CONF_ON_RECEIVE = "on_receive" diff --git a/esphome/components/usb_host/__init__.py b/esphome/components/usb_host/__init__.py index 1f12112eea7..07a5cae0ae5 100644 --- a/esphome/components/usb_host/__init__.py +++ b/esphome/components/usb_host/__init__.py @@ -2,7 +2,7 @@ import itertools import logging import esphome.codegen as cg -from esphome.components.const import CONF_MANUFACTURER +from esphome.components.const import CONF_MANUFACTURER, CONF_MAX_PACKET_SIZE from esphome.components.esp32 import ( VARIANT_ESP32H4, VARIANT_ESP32P4, @@ -38,7 +38,6 @@ CONF_PID = "pid" CONF_PRODUCT = "product" CONF_ENABLE_HUBS = "enable_hubs" CONF_MAX_TRANSFER_REQUESTS = "max_transfer_requests" -CONF_MAX_PACKET_SIZE = "max_packet_size" # VID/PID set to 0 or `None` product/manufacturer are wildcards