Commit Graph
26856 Commits
Author SHA1 Message Date
J. Nick Koston e485011740 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-06 17:29:12 -10:00
Jonathan Swoboda b6ef1a58fb [multiple] Fix validation ranges and error messages (#15508) 2026-04-06 23:17:35 -04:00
Jonathan Swoboda 9894bdc0f1 [multiple] Fix misc low-priority bugs (batch 3) (#15506) 2026-04-06 23:03:57 -04:00
J. Nick Koston 3f0b13deb3 Merge remote-tracking branch 'upstream/api-proto-max-length' into integration 2026-04-06 16:34:27 -10:00
J. Nick Koston 4461184afc Merge branch 'dev' into api-proto-max-length 2026-04-06 16:26:01 -10:00
J. Nick Koston 3c55828d81 Merge remote-tracking branch 'origin/controller-registry-inline-notify' into integration 2026-04-06 16:23:19 -10:00
J. Nick Koston e3e191b783 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-06 16:23:07 -10:00
J. Nick Koston 5906421ab1 Merge branch 'dev' into controller-registry-inline-notify 2026-04-06 16:18:46 -10:00
Jonathan Swoboda 99ee405f4e [esp32_ble][esp32_ble_server][esp32_ble_beacon] Fix UUID regex, IndexError, and unused inheritance (#15504) 2026-04-06 22:17:34 -04:00
Jonathan Swoboda 517d0390d0 [ota] Fix check_error skipping validation for RESPONSE_OK (#15501) 2026-04-06 22:17:25 -04:00
J. Nick Koston ef29b18e18 [core] Move ControllerRegistry notify methods inline into header
Move the notify_*_update() method definitions from controller_registry.cpp
into controller_registry.h as inline functions. These are tiny loops over
1-2 controllers that each have a single call site in the entity's
notify_frontend_() method.

When defined in a separate TU, the compiler cannot inline them at the call
site without LTO, resulting in an unnecessary function-call frame on every
state publish. CodSpeed profiling of the CallbackManager container change
(#15272) showed this extra frame accounting for ~12% regression in text
sensor publish benchmarks.

controller_registry.h is only ever included from .cpp files (never from
other headers), so including controller.h after the class definition is
safe and introduces no circular dependencies.
2026-04-06 16:09:32 -10:00
J. Nick Koston 96c3986481 [core] Replace std::vector in CallbackManager with trivial-copy container (#15272) 2026-04-07 01:58:17 +00:00
Jonathan Swoboda e62c78ad46 [multiple] Fix misc cosmetic bugs (error messages, types, defaults) (#15499) 2026-04-07 01:41:57 +00:00
Jonathan Swoboda e428cb5092 [multiple] Fix misc cosmetic bugs (batch 2) (#15502) 2026-04-06 21:33:22 -04:00
Jonathan Swoboda b8b8d1bb15 [core] Replace deprecated datetime.utcfromtimestamp() (#15503) 2026-04-06 21:31:57 -04:00
J. Nick Koston 82dc80a413 [scheduler] Skip cancel for anonymous items, add empty-container fast path (#15397) 2026-04-07 01:26:40 +00:00
J. Nick Koston c1f8bdedc2 Merge remote-tracking branch 'upstream/dev' into api-proto-max-length
# Conflicts:
#	esphome/components/api/api_pb2.cpp
2026-04-06 14:48:45 -10:00
J. Nick Koston d15fa84f4f [api] Auto-derive max_value for enum fields in protobuf codegen (#15469) 2026-04-06 14:39:55 -10:00
Jonathan Swoboda 4fa3e48d33 [remote_base] Fix misc protocol schema and codegen bugs (#15497) 2026-04-07 00:34:07 +00:00
Jonathan Swoboda 094e0440c6 [config] Fix unfilled placeholder in dimensions() error message (#15498) 2026-04-06 14:30:36 -10:00
J. Nick Koston b155c13117 [api] Use integer comparison for float zero checks in protobuf encoding (#15490) 2026-04-07 12:25:53 +12:00
Jonathan Swoboda 0816579fa9 [prometheus] Fix relabel validation not checking for required keys (#15496) 2026-04-06 14:20:46 -10:00
Jonathan Swoboda c6e683cc33 [pmsx003] Connect model-specific sensor validation to schema (#15495) 2026-04-06 14:19:53 -10:00
Jonathan Swoboda 14bcd9db59 [neopixelbus] Fix SPI pin validation accepting one wrong pin on ESP8266 (#15494) 2026-04-06 14:18:59 -10:00
Jonathan Swoboda d9da91efbe [bl0940] Fix restore_value reading from wrong config dict (#15492) 2026-04-06 14:14:17 -10:00
J. Nick Koston 7293683297 Merge branch 'integration' of https://github.com/esphome/esphome into integration 2026-04-06 14:09:54 -10:00
J. Nick Koston 6523ed05b8 Merge branch 'float-to-raw-optimization-v2' into integration
# Conflicts:
#	esphome/components/api/proto.h
2026-04-06 14:08:50 -10:00
J. Nick Koston 136eabebb4 Merge branch 'api-enum-auto-max-value' into integration
# Conflicts:
#	esphome/components/api/api_pb2.cpp
#	script/api_protobuf/api_protobuf.py
2026-04-06 14:07:38 -10:00
Jesse Hills 017af24c22 Merge branch 'release' into dev 2026-04-07 12:06:30 +12:00
Jesse Hills 496c395f1a Merge pull request #15489 from esphome/bump-2026.3.3
2026.3.3
2026.3.3
2026-04-07 12:05:46 +12:00
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
Jonathan Swoboda 29ca7bc8f9 [espnow] Fix string data generating invalid C++ char literals (#15493) 2026-04-06 19:57:16 -04: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
J. Nick Koston 37258de6b1 [api] Auto-derive max_value for enum fields in protobuf codegen
Scan all enum definitions in api.proto at codegen time and automatically
populate max_value for enum-typed fields. This eliminates the need for
manual (max_value) annotations on every enum field.

When max_value < 128, the generated calculate_size uses constant-size
arithmetic instead of a function call:
- `calc_uint32(1, static_cast<uint32_t>(field))` → `field ? 2 : 0`

For repeated enum fields with constant element size, the per-element
loop is replaced with a multiply: `size += count * bytes_per_element`.
2026-04-06 13:19:37 -10:00
Jesse Hills 62d0c25a2b [CI] Add branches-ignore for release and beta in PR title check (#15491) 2026-04-07 11:14:59 +12:00
J. Nick Koston a1cc7ea861 [api] Use integer comparison for float zero checks in protobuf encoding
encode_float() already used union type-punning to convert a float to
its raw uint32_t bits for encoding. However, its zero check still used
a floating-point comparison (value == 0.0f), and calc_float() used
value != 0.0f with no type-punning at all.

Extract the existing union type-punning into a shared float_to_raw()
helper and use it in both places, so the zero check is a simple integer
comparison (raw == 0) in both encode_float() and calc_float(). This
ensures size calculation always matches encoding.

On platforms without hardware FPU (ESP8266, some LibreTiny chips),
value != 0.0f compiles to a software float library call (__nesf2 or
similar). The new code does a single integer comparison instead.
2026-04-06 13:01:19 -10:00
Jesse Hills 1c67e4ce4c Bump version to 2026.3.3 2026-04-07 10:50:41 +12:00
Clyde Stubbs 162c8810db [esp32] Clean build when sdkconfig options change (#15439) 2026-04-07 10:50:41 +12:00
Clyde Stubbs 9036c29c8a [online_image] Clear LVGL dsc when image size changes. (#15360) 2026-04-07 10:50:41 +12:00
Edward Firmo 9bd936112d [nextion] Fix queue age check using inconsistent time sources (#15317) 2026-04-07 10:50:41 +12:00
Clyde Stubbs c98bb9060f [lvgl] Fix setting triggers on display (#15364) 2026-04-07 10:48:14 +12:00
Clyde Stubbs ce0d360790 [lvgl] Implement rotation directly (#14955) 2026-04-07 10:46:42 +12:00
J. Nick Kostonandpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> 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 SwobodaandJ. 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