mirror of
https://github.com/esphome/esphome.git
synced 2026-08-30 17:46:01 +00:00
e174e579ed3a3534edc2158eb59ac9a0d7fc4be0
Add max_data_length field option for string/bytes fields. When max_data_length < 128, the codegen emits constant-size length varint calculations and direct byte writes. Annotate all entity name and object_id fields with (max_data_length) = 120 and (force) = true across all 25 ListEntities*Response messages (50 fields). Generated code changes: - calculate_size: `calc_length(1, size)` -> `2 + size` (constant) - encode: `encode_string(N, ref)` -> `write_raw_byte(tag) + write_raw_byte(len) + encode_raw(data, len)` Eliminates 2 function calls per field per entity list response, removes zero-check branches, and removes varint size computation.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
584 MiB
Languages
C++
56.2%
Python
43.2%
C
0.3%
JavaScript
0.2%
