From da40288b2d310fc8b49f6ae3bbe794c42b76f7b1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Mar 2026 07:25:22 -1000 Subject: [PATCH] Update esphome/core/config.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- esphome/core/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/core/config.py b/esphome/core/config.py index d40b693b81..d4a839cb79 100644 --- a/esphome/core/config.py +++ b/esphome/core/config.py @@ -224,7 +224,8 @@ else: FRIENDLY_NAME_MAX_LEN = 120 # Max device class string length (47 chars + null = 48-byte PROGMEM buffer) -# Keep in sync with MAX_DEVICE_CLASS_LENGTH in esphome/core/entity_base.h +# Keep in sync with MAX_DEVICE_CLASS_LENGTH in esphome/core/entity_base.h: +# DEVICE_CLASS_MAX_LENGTH == MAX_DEVICE_CLASS_LENGTH - 1 (C++ includes the null) DEVICE_CLASS_MAX_LENGTH = 47