From 8335bb5f8efc07038830f243668e80ae168458c1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 3 Mar 2026 08:18:18 -1000 Subject: [PATCH] remove unnecessary PROGMEM empty string from weak default The weak default is only reached when USE_ENTITY_ICON is disabled, and get_icon_to() already short-circuits with return "" in that case. --- esphome/core/entity_base.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/core/entity_base.cpp b/esphome/core/entity_base.cpp index 63b93b82b8..ae84579f4a 100644 --- a/esphome/core/entity_base.cpp +++ b/esphome/core/entity_base.cpp @@ -49,9 +49,7 @@ void EntityBase::set_name(const char *name, uint32_t object_id_hash) { // Weak default lookup functions — overridden by generated code in main.cpp __attribute__((weak)) const char *entity_device_class_lookup(uint8_t) { return ""; } __attribute__((weak)) const char *entity_uom_lookup(uint8_t) { return ""; } -// Icon empty string must be PROGMEM — on ESP8266 callers use strncpy_P to read it -static const char ENTITY_ICON_EMPTY[] PROGMEM = ""; -__attribute__((weak)) const char *entity_icon_lookup(uint8_t) { return ENTITY_ICON_EMPTY; } +__attribute__((weak)) const char *entity_icon_lookup(uint8_t) { return ""; } // Entity device class (from index) StringRef EntityBase::get_device_class_ref() const {