esphome 2025.7.0b1__py3-none-any.whl → 2025.7.0b3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- esphome/components/api/__init__.py +19 -5
- esphome/components/api/api_connection.cpp +53 -175
- esphome/components/api/api_connection.h +28 -25
- esphome/components/api/api_frame_helper.cpp +2 -3
- esphome/components/api/api_frame_helper.h +7 -9
- esphome/components/api/api_pb2.cpp +1862 -5133
- esphome/components/api/api_pb2.h +291 -533
- esphome/components/api/api_pb2_dump.cpp +99 -0
- esphome/components/api/api_pb2_service.cpp +4 -0
- esphome/components/api/api_pb2_service.h +6 -0
- esphome/components/api/api_server.cpp +2 -9
- esphome/components/api/api_server.h +7 -33
- esphome/components/api/custom_api_device.h +8 -0
- esphome/components/api/list_entities.cpp +2 -0
- esphome/components/api/list_entities.h +3 -1
- esphome/components/api/proto.h +506 -23
- esphome/components/api/user_services.h +2 -0
- esphome/components/debug/debug_esp32.cpp +2 -0
- esphome/components/esp32/__init__.py +1 -0
- esphome/components/esp32_camera/__init__.py +1 -1
- esphome/components/esp32_touch/esp32_touch_v1.cpp +12 -10
- esphome/components/esp8266/__init__.py +1 -0
- esphome/components/esp_ldo/__init__.py +10 -8
- esphome/components/esp_ldo/esp_ldo.h +3 -0
- esphome/components/gpio/binary_sensor/__init__.py +24 -3
- esphome/components/host/__init__.py +1 -0
- esphome/components/i2s_audio/speaker/__init__.py +1 -1
- esphome/components/ld2410/ld2410.cpp +12 -28
- esphome/components/ld2420/binary_sensor/ld2420_binary_sensor.cpp +2 -2
- esphome/components/ld2420/button/reconfig_buttons.cpp +1 -1
- esphome/components/ld2420/ld2420.cpp +66 -57
- esphome/components/ld2420/ld2420.h +9 -11
- esphome/components/ld2420/number/gate_config_number.cpp +1 -1
- esphome/components/ld2420/select/operating_mode_select.cpp +1 -1
- esphome/components/ld2420/sensor/ld2420_sensor.cpp +2 -2
- esphome/components/ld2420/text_sensor/text_sensor.cpp +2 -2
- esphome/components/libretiny/__init__.py +1 -0
- esphome/components/lvgl/widgets/meter.py +20 -13
- esphome/components/mqtt/mqtt_backend_esp32.cpp +6 -2
- esphome/components/packet_transport/packet_transport.cpp +3 -0
- esphome/components/rp2040/__init__.py +1 -0
- esphome/components/substitutions/__init__.py +5 -2
- esphome/components/sx126x/__init__.py +3 -3
- esphome/components/sx127x/__init__.py +2 -2
- esphome/components/usb_host/usb_host_client.cpp +10 -10
- esphome/components/usb_uart/cp210x.cpp +1 -1
- esphome/components/usb_uart/usb_uart.cpp +41 -44
- esphome/components/usb_uart/usb_uart.h +4 -3
- esphome/const.py +1 -1
- esphome/core/component.cpp +8 -8
- esphome/core/component_iterator.cpp +4 -2
- esphome/core/component_iterator.h +3 -3
- esphome/core/defines.h +1 -1
- esphome/core/entity_helpers.py +6 -0
- esphome/core/helpers.h +1 -1
- esphome/core/scheduler.cpp +9 -12
- esphome/core/scheduler.h +0 -3
- esphome/wizard.py +1 -1
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/METADATA +2 -2
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/RECORD +64 -65
- esphome/components/api/api_pb2_size.h +0 -359
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/WHEEL +0 -0
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/entry_points.txt +0 -0
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/licenses/LICENSE +0 -0
- {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b3.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
#include "esphome/core/helpers.h"
|
|
6
6
|
#include "esphome/core/log.h"
|
|
7
7
|
#include "proto.h"
|
|
8
|
-
#include "api_pb2_size.h"
|
|
9
8
|
#include <cstring>
|
|
10
9
|
#include <cinttypes>
|
|
11
10
|
|
|
@@ -613,7 +612,7 @@ APIError APINoiseFrameHelper::read_packet(ReadPacketBuffer *buffer) {
|
|
|
613
612
|
buffer->type = type;
|
|
614
613
|
return APIError::OK;
|
|
615
614
|
}
|
|
616
|
-
APIError APINoiseFrameHelper::write_protobuf_packet(
|
|
615
|
+
APIError APINoiseFrameHelper::write_protobuf_packet(uint8_t type, ProtoWriteBuffer buffer) {
|
|
617
616
|
// Resize to include MAC space (required for Noise encryption)
|
|
618
617
|
buffer.get_buffer()->resize(buffer.get_buffer()->size() + frame_footer_size_);
|
|
619
618
|
PacketInfo packet{type, 0,
|
|
@@ -1002,7 +1001,7 @@ APIError APIPlaintextFrameHelper::read_packet(ReadPacketBuffer *buffer) {
|
|
|
1002
1001
|
buffer->type = rx_header_parsed_type_;
|
|
1003
1002
|
return APIError::OK;
|
|
1004
1003
|
}
|
|
1005
|
-
APIError APIPlaintextFrameHelper::write_protobuf_packet(
|
|
1004
|
+
APIError APIPlaintextFrameHelper::write_protobuf_packet(uint8_t type, ProtoWriteBuffer buffer) {
|
|
1006
1005
|
PacketInfo packet{type, 0, static_cast<uint16_t>(buffer.get_buffer()->size() - frame_header_padding_)};
|
|
1007
1006
|
return write_protobuf_packets(buffer, std::span<const PacketInfo>(&packet, 1));
|
|
1008
1007
|
}
|
|
@@ -30,13 +30,11 @@ struct ReadPacketBuffer {
|
|
|
30
30
|
|
|
31
31
|
// Packed packet info structure to minimize memory usage
|
|
32
32
|
struct PacketInfo {
|
|
33
|
-
uint16_t
|
|
34
|
-
uint16_t
|
|
35
|
-
|
|
36
|
-
uint16_t padding; // 2 byte (for alignment)
|
|
33
|
+
uint16_t offset; // Offset in buffer where message starts
|
|
34
|
+
uint16_t payload_size; // Size of the message payload
|
|
35
|
+
uint8_t message_type; // Message type (0-255)
|
|
37
36
|
|
|
38
|
-
PacketInfo(
|
|
39
|
-
: message_type(type), offset(off), payload_size(size), padding(0) {}
|
|
37
|
+
PacketInfo(uint8_t type, uint16_t off, uint16_t size) : offset(off), payload_size(size), message_type(type) {}
|
|
40
38
|
};
|
|
41
39
|
|
|
42
40
|
enum class APIError : uint16_t {
|
|
@@ -98,7 +96,7 @@ class APIFrameHelper {
|
|
|
98
96
|
}
|
|
99
97
|
// Give this helper a name for logging
|
|
100
98
|
void set_log_info(std::string info) { info_ = std::move(info); }
|
|
101
|
-
virtual APIError write_protobuf_packet(
|
|
99
|
+
virtual APIError write_protobuf_packet(uint8_t type, ProtoWriteBuffer buffer) = 0;
|
|
102
100
|
// Write multiple protobuf packets in a single operation
|
|
103
101
|
// packets contains (message_type, offset, length) for each message in the buffer
|
|
104
102
|
// The buffer contains all messages with appropriate padding before each
|
|
@@ -197,7 +195,7 @@ class APINoiseFrameHelper : public APIFrameHelper {
|
|
|
197
195
|
APIError init() override;
|
|
198
196
|
APIError loop() override;
|
|
199
197
|
APIError read_packet(ReadPacketBuffer *buffer) override;
|
|
200
|
-
APIError write_protobuf_packet(
|
|
198
|
+
APIError write_protobuf_packet(uint8_t type, ProtoWriteBuffer buffer) override;
|
|
201
199
|
APIError write_protobuf_packets(ProtoWriteBuffer buffer, std::span<const PacketInfo> packets) override;
|
|
202
200
|
// Get the frame header padding required by this protocol
|
|
203
201
|
uint8_t frame_header_padding() override { return frame_header_padding_; }
|
|
@@ -251,7 +249,7 @@ class APIPlaintextFrameHelper : public APIFrameHelper {
|
|
|
251
249
|
APIError init() override;
|
|
252
250
|
APIError loop() override;
|
|
253
251
|
APIError read_packet(ReadPacketBuffer *buffer) override;
|
|
254
|
-
APIError write_protobuf_packet(
|
|
252
|
+
APIError write_protobuf_packet(uint8_t type, ProtoWriteBuffer buffer) override;
|
|
255
253
|
APIError write_protobuf_packets(ProtoWriteBuffer buffer, std::span<const PacketInfo> packets) override;
|
|
256
254
|
uint8_t frame_header_padding() override { return frame_header_padding_; }
|
|
257
255
|
// Get the frame footer size required by this protocol
|