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

[api] Fix missing ifdef guards for field_ifdef fields in protobuf base classes (#9693)

This commit is contained in:
J. Nick Koston
2025-07-19 17:41:00 -10:00
committed by GitHub
parent 727e8ca376
commit 5b3d61b4a6
3 changed files with 40 additions and 3 deletions

View File

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