mirror of
https://github.com/esphome/esphome.git
synced 2026-09-20 03:28:41 +00:00
[core] Use get_icon_ref() in entity platform logging to avoid string allocations (#10530)
This commit is contained in:
@@ -14,8 +14,8 @@ void log_button(const char *tag, const char *prefix, const char *type, Button *o
|
||||
|
||||
ESP_LOGCONFIG(tag, "%s%s '%s'", prefix, type, obj->get_name().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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user