J. Nick Koston
13e35db055
Restore IRAM_ATTR on wake_loop functions
2026-04-06 14:03:19 -10:00
J. Nick Koston
7c671cd0e6
Merge branch 'api-proto-max-length' into integration
...
# Conflicts:
# esphome/components/api/api_connection.cpp
# esphome/components/api/api_pb2.cpp
# esphome/components/api/proto.h
# esphome/core/application.h
# esphome/core/component.cpp
# script/api_protobuf/api_protobuf.py
2026-04-06 14:02:14 -10:00
J. Nick Koston
2eb3e25278
Add debug assert to encode_short_string_force for size < 128
2026-04-06 13:58:10 -10:00
J. Nick Koston
be476c3a79
Merge remote-tracking branch 'upstream/api/peel-first-write-iteration' into integration
2026-04-06 13:49:16 -10:00
J. Nick Koston
17e5320836
do not force inline
2026-04-06 13:40:50 -10:00
J. Nick Koston
87622c9a74
[api] Add max_data_length proto option and optimize entity string encoding
...
Add a max_data_length field option to api_options.proto for string/bytes
fields. When max_data_length < 128 and force = true, the code generator
uses encode_short_string_force() — a single call that writes the tag
byte, 1-byte length varint, and raw string data with no branching. Size
calculation simplifies from calc_length(1, size) to 2 + size.
Annotate entity fields across all 25 ListEntities*Response messages:
- name and object_id: max_data_length = 120, force = true (50 fields)
- icon: max_data_length = 63 (25 fields)
The 120 and 63 values match NAME_MAX_LENGTH and ICON_MAX_LENGTH in
esphome/core/config.py, validated at config time.
2026-04-06 13:28:50 -10:00
Clyde Stubbs
ce0d360790
[lvgl] Implement rotation directly ( #14955 )
2026-04-07 10:46:42 +12:00
J. Nick Koston and pre-commit-ci-lite[bot]
2b5ee69eb2
[api] Speed up protobuf encode 17-20% with register-optimized write path ( #15290 )
...
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-04-06 12:42:18 -10:00
Jonathan Swoboda and J. Nick Koston
5a14d6a4ad
[multiple] Add missing device_class to sensor schemas (batch 2) ( #15487 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-04-06 22:38:47 +00:00
Jonathan Swoboda
6f62b2f18c
[thermostat] Remove non-functional cv.templatable from preset fields ( #15481 )
2026-04-06 12:20:38 -10:00
Jonathan Swoboda
c78fb964a2
[multiple] Add missing state_class to remaining sensor schemas ( #15486 )
2026-04-06 12:15:42 -10:00
Jonathan Swoboda
8650c5b013
[multiple] Add missing state_class to sensor schemas ( #15478 )
2026-04-06 17:19:20 -04:00
Jonathan Swoboda
5051891813
[esp32] Fix ESP32-C6 pin validator rejecting GPIO 24-30 with wrong error ( #15477 )
2026-04-06 17:02:28 -04:00
Jonathan Swoboda
95e2b0a8b0
[multiple] Add missing device_class to sensor schemas ( #15479 )
2026-04-06 17:02:20 -04:00
J. Nick Koston and Jonathan Swoboda
ab45591507
[core] Move wake_loop out of socket component into core ( #15446 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
2026-04-06 21:01:03 +00:00
Jonathan Swoboda
62b4b250c7
[opentherm] Fix step=0 default overriding entity step ( #15484 )
2026-04-07 08:35:50 +12:00
Jonathan Swoboda
a7963bee98
[gcja5][cd74hc4067][openthread_info] Fix PollingComponent mismatches ( #15476 )
2026-04-06 16:31:40 -04:00
Jonathan Swoboda
e86978f0da
[rpi_dpi_rgb][st7701s][ags10] Fix Optional config keys accessed unconditionally ( #15474 )
2026-04-06 16:30:46 -04:00
Jonathan Swoboda
6044f41db5
[multiple] Add missing cv.COMPONENT_SCHEMA to CONFIG_SCHEMA ( #15475 )
2026-04-06 16:30:15 -04:00
Jonathan Swoboda
a64f09a43f
[sprinkler][dfplayer][max6956][rf_bridge] Fix cg.templatable type mismatches ( #15480 )
2026-04-06 16:29:59 -04:00
Jonathan Swoboda
dbd4e77d61
[pylontech] Remove unnecessary Component inheritance from sensor/text_sensor ( #15482 )
2026-04-06 16:23:10 -04:00
Boris Krivonog
02185fb4f4
[mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 5) ( #15483 )
2026-04-06 09:59:18 -10:00
J. Nick Koston
4099064207
Use write_short_string for non-forced strings with max_data_length < 128
...
Add empty check wrapper for non-forced short strings instead of falling
through to the general encode_string path.
2026-04-06 08:43:24 -10:00
J. Nick Koston and Claude Opus 4.6
33285dfe27
Fix merge issues: write_short_string to static ProtoEncode, add debug arg
...
- Convert ProtoEncode::write_short_string to static method with pos param
- Fix codegen to emit ProtoEncode::write_short_string(pos, ...)
- Add PROTO_ENCODE_DEBUG_INIT to encode_fn call in encode_to_buffer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 08:33:13 -10:00
J. Nick Koston and Claude Opus 4.6
7122fb6f88
Merge remote-tracking branch 'upstream/api-sint32-short-varint' into integration
...
Fix double static_cast in enum encode precomputed tag path by
passing raw field ref instead of pre-cast value_expr.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 08:31:05 -10:00
J. Nick Koston
443e42978b
Merge branch 'dev' into api/peel-first-write-iteration
2026-04-06 02:08:14 -10:00
dependabot[bot]
2f2b7e42ba
Bump aioesphomeapi from 44.9.1 to 44.11.1 ( #15471 )
2026-04-05 21:15:02 -10:00
J. Nick Koston
972c919ac0
Merge remote-tracking branch 'upstream/api-proto-max-length' into integration
2026-04-05 19:12:29 -10:00
J. Nick Koston
4e99510624
[api] Fix comment source references and add missing max_data_length
...
- Fix comment: NAME_MAX_LENGTH is in config_validation.py, not core/config.py
- Add missing max_data_length=63 to unit_of_measurement in ListEntitiesNumberResponse
2026-04-05 19:07:22 -10:00
J. Nick Koston
8fc7cdbe28
Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration
2026-04-05 19:04:51 -10:00
J. Nick Koston
fef4ff4a82
[api] Remove encode_small_varint — no real benefit over encode_uint32
2026-04-05 19:04:01 -10:00
J. Nick Koston
03d64317c7
Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration
2026-04-05 18:58:09 -10:00
J. Nick Koston
d5b5a6a4a7
[api] Don't use encode_small_varint for forced fields (must encode zero)
2026-04-05 18:57:04 -10:00
J. Nick Koston
307f436229
[api] Move zero-check into encode_small_varint to simplify call sites
2026-04-05 18:56:10 -10:00
J. Nick Koston
27a16ca97c
[api] Use local pointer in encode_small_varint to avoid aliased pos_ stores
2026-04-05 18:54:39 -10:00
J. Nick Koston
883a300785
[api] Add encode_small_varint helper for single-byte tag+value encoding
...
Replace two separate write_raw_byte calls with a single
encode_small_varint(tag, value) call that writes both bytes
with one bounds check. Used for enum fields with max < 128.
2026-04-05 18:53:48 -10:00
J. Nick Koston
5a6330e366
[api] Remove redundant uint32_t cast in enum raw byte writes
2026-04-05 18:51:14 -10:00
J. Nick Koston
5c178eab63
[api] Optimize encode for non-forced enum fields with single-byte tags
...
When an enum field has max_value < 128 and a single-byte tag, emit
inline write_raw_byte calls instead of calling encode_uint32, which
avoids encode_field_raw and encode_varint_raw function call overhead.
2026-04-05 18:50:23 -10:00
J. Nick Koston
2b8311182a
Merge remote-tracking branch 'upstream/api-proto-max-length' into integration
2026-04-05 18:42:52 -10:00
J. Nick Koston
2d43d07490
Merge branch 'dev' into api-proto-max-length
2026-04-05 18:42:30 -10:00
dependabot[bot]
1c97954b47
Bump aioesphomeapi from 44.9.0 to 44.9.1 ( #15470 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-05 18:42:17 -10:00
J. Nick Koston
3f7e636f7a
Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration
2026-04-05 18:40:32 -10:00
J. Nick Koston
bc47757af1
Merge remote-tracking branch 'upstream/dev' into integration
2026-04-05 18:39:27 -10:00
Boris Krivonog
859ea23bde
[mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 4) ( #15462 )
2026-04-05 18:33:02 -10:00
J. Nick Koston
acd2fc3711
[api] Use multiply instead of loop for constant-size repeated enums
...
When a repeated enum field has a constant size per element (max < 128),
emit size * constant instead of iterating. This fixes unused variable
warnings from clang-tidy and generates more efficient code.
2026-04-05 18:29:01 -10:00
J. Nick Koston
0fc3664441
[api] Auto-derive max_value for enum fields in protobuf codegen
...
The protobuf code generator already parses all enum definitions and
knows every enum's maximum value. Use this to automatically apply the
max_value < 128 optimization to all enum fields, eliminating the need
for manual annotation.
Since every enum in api.proto has max < 128, all 58 enum field size
calculations now use constant arithmetic instead of calling varint
size functions.
Builds on #15424 which introduced the max_value optimization.
2026-04-05 18:16:14 -10:00
J. Nick Koston
aa76b7bfc6
Merge remote-tracking branch 'upstream/dev' into api-proto-max-length
2026-04-05 18:06:45 -10:00
Jonathan Swoboda
7644f17cf6
[at581x] Fix codegen crash when using lambdas for frequency/time/power ( #15468 )
2026-04-06 00:05:04 -04:00
J. Nick Koston
1de94c1a84
[api] Add max_value proto option for constant-size varint codegen ( #15424 )
2026-04-05 18:02:06 -10:00
J. Nick Koston
10f08e0802
[esp8266] Add crash handler for post-mortem diagnostics ( #15465 )
2026-04-06 03:30:56 +00:00