From 707346b6de20365db15100ea6d1e620119deb4b9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Jun 2025 02:12:04 +0100 Subject: [PATCH] remove batch --- esphome/components/api/api_connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 333480b2ae..1f6e587a8d 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -525,7 +525,7 @@ APIConnection::MessageInfo APIConnection::try_send_sensor_info_(EntityBase *enti msg.device_class = sensor->get_device_class(); msg.state_class = static_cast(sensor->get_state_class()); msg.unique_id = sensor->unique_id(); - if (msg->unique_id.empty()) + if (msg.unique_id.empty()) msg.unique_id = get_default_unique_id("sensor", sensor); fill_entity_info_base_(sensor, msg); return encode_message_to_buffer(msg, buffer, max_size); @@ -591,7 +591,7 @@ APIConnection::MessageInfo APIConnection::try_send_text_sensor_info_(EntityBase ListEntitiesTextSensorResponse msg; // Stack allocated! msg.device_class = text_sensor->get_device_class(); msg.unique_id = text_sensor->unique_id(); - if (msg->unique_id.empty()) + if (msg.unique_id.empty()) msg.unique_id = get_default_unique_id("text_sensor", text_sensor); // Fill common entity fields