[core] Use get_icon_ref() in entity platform logging to avoid string allocations (#10530)

This commit is contained in:
J. Nick Koston
2025-09-03 14:23:46 +12:00
committed by GitHub
parent 1a054299d4
commit 83fbd77c4a
12 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ void log_sensor(const char *tag, const char *prefix, const char *type, Sensor *o
ESP_LOGCONFIG(tag, "%s Device Class: '%s'", prefix, obj->get_device_class().c_str());
}
if (!obj->get_icon().empty()) {
ESP_LOGCONFIG(tag, "%s Icon: '%s'", prefix, obj->get_icon().c_str());
if (!obj->get_icon_ref().empty()) {
ESP_LOGCONFIG(tag, "%s Icon: '%s'", prefix, obj->get_icon_ref().c_str());
}
if (obj->get_force_update()) {