On ESP32, replace lwip_select() in yield_with_select_() with direct
socket event reads via lwip_socket_dbg_get_socket(), reducing poll
cost from 133us to ~7us (18.7x faster). Replace the UDP loopback
wake socket with FreeRTOS task notifications (<2us, ISR-safe).
Benchmarks (ESP32, 4 listen sockets):
- Poll path: 7,087 ns vs 132,402 ns (18.7x faster)
- Wake signal: 1,826 ns vs ~130,000 ns (72x faster, now ISR-safe)
- Binary: yield_with_select_ 108B vs 188B (43% smaller)
Non-ESP32 platforms (LibreTiny, ESP8266, RP2040) are unchanged.
std::lerp includes NaN/infinity edge-case handling per C++20 spec which
adds ~200 bytes of overhead per call. With 10 fields interpolated, this
bloated the symbol to 2,038 bytes on BK72xx. Since all light color values
are pre-clamped finite floats, a simple a + t * (b - a) is sufficient.
Reduces LightColorValues::lerp from 2,038 B to 286 B on BK72xx.
Also saves 16 bytes on ESP8266.
std::lerp includes NaN/infinity edge-case handling per C++20 spec, which
generates ~200 bytes of overhead per call. With 10 fields interpolated,
this bloated the symbol to 2,038 bytes. Since all light color values are
pre-clamped finite floats, a simple a + t * (b - a) is sufficient.
Reduces LightColorValues::lerp from 2,038 B to 286 B (86% reduction).
Old clients (before 2026.3.0) send only the timezone string without the
parsed_timezone struct, so all fields default to zero. Without this check,
the device would overwrite its codegen-configured timezone with UTC.
Keep the codegen timezone when the struct is unpopulated (all zeros).
For actual UTC this also skips, which is harmless since UTC is the default.
Move tests that use make_us_central(), set_global_tz(), ParsedTimezone,
and DSTRuleType into esphome::time::testing namespace where those symbols
are declared.
Remove the runtime POSIX TZ string parser and all associated bridge code
now that timezone data is sent as pre-parsed structs via protobuf.
Removed:
- parse_posix_tz() and internal parsing helpers (skip_tz_name, parse_offset,
parse_dst_rule, parse_uint, parse_transition_time)
- RealTimeClock::set_timezone() overloads and apply_timezone_()
- API connection fallback path for string-based timezone
Kept:
- All conversion functions (epoch_to_local_tm, is_in_dst, calculate_dst_transition)
- Internal helpers used by conversion functions
- localtime_r/localtime overrides
- Tests for all permanent functions