From ceee1378db2c57e3e6bea06c1ecc10e984a0bbea Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 3 Mar 2026 12:13:18 -1000 Subject: [PATCH] add bit layout comment to configure_entity unpacking Co-Authored-By: Claude Opus 4.6 --- esphome/core/entity_base.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/core/entity_base.cpp b/esphome/core/entity_base.cpp index 3b937aff4fe..15b70cfdc87 100644 --- a/esphome/core/entity_base.cpp +++ b/esphome/core/entity_base.cpp @@ -43,6 +43,8 @@ void EntityBase::configure_entity(const char *name, uint32_t object_id_hash, uin this->calc_object_id_(); } } + // Unpack entity string table indices. + // Packed: [23..16] icon | [15..8] UoM | [7..0] device_class (each 8 bits) #ifdef USE_ENTITY_DEVICE_CLASS this->device_class_idx_ = entity_strings_packed & 0xFF; #endif