This commit is contained in:
kbx81
2026-01-08 00:54:23 -06:00
parent 4e1ea406a6
commit acdba62d30
2 changed files with 4 additions and 4 deletions

View File

@@ -1650,7 +1650,7 @@ bool APIConnection::send_device_info_response(const DeviceInfoRequest &msg) {
// Get supported protocols as JSON - write directly to local string to avoid intermediate allocations
std::string supported_protocols;
infrared_proxy::get_infrared_proxy_supported_protocols(supported_protocols);
resp.set_infrared_proxy_supported_protocols(StringRef(supported_protocols));
resp.infrared_proxy_supported_protocols = StringRef(supported_protocols);
#endif
#ifdef USE_API_NOISE
resp.api_encryption_supported = true;

View File

@@ -747,15 +747,15 @@ void APIServer::list_infrared_proxy_entities(APIConnection *conn) {
msg.key = infrared_proxy->get_object_id_hash();
char object_id_buf[OBJECT_ID_MAX_LEN];
msg.set_object_id(infrared_proxy->get_object_id_to(object_id_buf));
msg.object_id = infrared_proxy->get_object_id_to(object_id_buf);
if (infrared_proxy->has_own_name()) {
msg.set_name(infrared_proxy->get_name());
msg.name = StringRef(infrared_proxy->get_name());
}
// Set common EntityBase properties
#ifdef USE_ENTITY_ICON
msg.set_icon(infrared_proxy->get_icon_ref());
msg.icon = infrared_proxy->get_icon_ref();
#endif
msg.disabled_by_default = infrared_proxy->is_disabled_by_default();
msg.entity_category = static_cast<enums::EntityCategory>(infrared_proxy->get_entity_category());