mirror of
https://github.com/esphome/esphome.git
synced 2026-03-03 03:08:21 -07:00
[core] Use StringRef for get_comment and get_compilation_time to avoid allocations (#12219)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -287,7 +287,7 @@ std::string WebServer::get_config_json() {
|
||||
JsonObject root = builder.root();
|
||||
|
||||
root[ESPHOME_F("title")] = App.get_friendly_name().empty() ? App.get_name() : App.get_friendly_name();
|
||||
root[ESPHOME_F("comment")] = App.get_comment();
|
||||
root[ESPHOME_F("comment")] = App.get_comment_ref();
|
||||
#if defined(USE_WEBSERVER_OTA_DISABLED) || !defined(USE_WEBSERVER_OTA)
|
||||
root[ESPHOME_F("ota")] = false; // Note: USE_WEBSERVER_OTA_DISABLED only affects web_server, not captive_portal
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user