1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

suggestion

This commit is contained in:
J. Nick Koston
2025-08-02 14:20:18 -10:00
parent 901fd47f48
commit 7391bbc6ee

View File

@@ -383,8 +383,9 @@ static void set_json_id(JsonObject &root, EntityBase *obj, const std::string &id
root["name"] = obj->get_name(); root["name"] = obj->get_name();
root["icon"] = obj->get_icon(); root["icon"] = obj->get_icon();
root["entity_category"] = obj->get_entity_category(); root["entity_category"] = obj->get_entity_category();
if (obj->is_disabled_by_default()) bool is_disabled = obj->is_disabled_by_default();
root["is_disabled_by_default"] = obj->is_disabled_by_default(); if (is_disabled)
root["is_disabled_by_default"] = is_disabled;
} }
} }