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

Reduce binary size with field-level conditional compilation for protobuf messages (#9473)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-07-15 20:36:26 -10:00
committed by GitHub
parent f3c0c0c00c
commit 3ab1ee7a04
8 changed files with 834 additions and 110 deletions

View File

@@ -286,8 +286,10 @@ class APIConnection : public APIServerConnection {
if (entity->has_own_name())
response.name = entity->get_name();
// Set common EntityBase properties
// Set common EntityBase properties
#ifdef USE_ENTITY_ICON
response.icon = entity->get_icon();
#endif
response.disabled_by_default = entity->is_disabled_by_default();
response.entity_category = static_cast<enums::EntityCategory>(entity->get_entity_category());
#ifdef USE_DEVICES