diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index 12251b8ba4..89ec61877c 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -315,8 +315,8 @@ class APIConnection : public APIServerConnection { #ifdef USE_BINARY_SENSOR static EncodedMessage try_send_binary_sensor_state(EntityBase *binary_sensor, APIConnection *conn, uint32_t remaining_size, bool is_single); - static EncodedMessage try_send_binary_sensor_info(EntityBase *binary_sensor, APIConnection *conn, - uint32_t remaining_size, bool is_single); + static EncodedMessage try_send_binary_sensor_info(EntityBase *entity, APIConnection *conn, uint32_t remaining_size, + bool is_single); #endif #ifdef USE_COVER static EncodedMessage try_send_cover_state(EntityBase *entity, APIConnection *conn, uint32_t remaining_size, diff --git a/esphome/components/api/api_frame_helper.cpp b/esphome/components/api/api_frame_helper.cpp index 456720c668..92d419b91a 100644 --- a/esphome/components/api/api_frame_helper.cpp +++ b/esphome/components/api/api_frame_helper.cpp @@ -613,7 +613,7 @@ APIError APINoiseFrameHelper::write_protobuf_packet(uint16_t type, ProtoWriteBuf // Use write_protobuf_packets with a single packet std::vector> packets; - packets.push_back(std::make_tuple(type, 0, payload_len)); + packets.emplace_back(type, 0, payload_len); return write_protobuf_packets(buffer, packets); }