mirror of
https://github.com/esphome/esphome.git
synced 2026-02-20 08:25:35 -07:00
[web_server] Guard icon JSON field with USE_ENTITY_ICON (#13948)
This commit is contained in:
@@ -557,7 +557,9 @@ static void set_json_id(JsonObject &root, EntityBase *obj, const char *prefix, J
|
||||
root[ESPHOME_F("device")] = device_name;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_ENTITY_ICON
|
||||
root[ESPHOME_F("icon")] = obj->get_icon_ref();
|
||||
#endif
|
||||
root[ESPHOME_F("entity_category")] = obj->get_entity_category();
|
||||
bool is_disabled = obj->is_disabled_by_default();
|
||||
if (is_disabled)
|
||||
|
||||
Reference in New Issue
Block a user