Repository navigation
Description
Summary
I have a lot of PRs open, which makes it hard to see which ones matter most. This issue is a guide to the higher-value ones, in priority order, so review time goes to them first.
A PR is here when it is worth far more than the review time it takes: it improves the automated review of every incoming PR, fixes crashes that many users can hit, adds a shared helper that makes contributor PRs smaller and reduces the long term review burden, saves a lot of flash or RAM on real devices, or fixes a performance problem users feel. A helper pays back each time a contributor PR uses it instead of hand-writing the same code, and each time a reviewer no longer has to check that code.
The rest of my open PRs improve things for a smaller slice of users, so they merge as there is time.
PRs
1. Review skill improvements for incoming PRs
- no open PRs -
2. Crash and use-after-free fixes
- [esp8266] Make delay() wait the full time esphome#23382
[esp8266] Make delay() wait the full time(mergeable, milestone 2026.12.0): since 2026.5.1, everydelay()on ESP8266 can return after microseconds instead of the time asked for, whenever a socket, lwIP or Wi-Fi event wakes the loop, so any timed wait a component relies on (sensor conversions, bus settle times, the wait before a restart) can be cut short. Found on [async_tcp][esp8266][mqtt] Add ESP8266 MQTT TLS support esphome#14855, where the 100 ms wait before a restart took 55 µs and the MQTT reset never left the radio; with the full wait the reset and Last Will got out 13 of 15 times instead of 1 of 5. +92 B flash, no RAM. - [esp32] Fix new (std::nothrow) aborting instead of returning nullptr esphome#20447
[esp32] Fix new (std::nothrow) aborting instead of returning nullptr(mergeable): on ESP-IDF,new (std::nothrow)aborts when the heap is full instead of returningnullptr, so out-of-memory handling written for it still crashes.
3. Helpers that make contributor PRs smaller and reduce long term review burden
These save more review and contributor time than any single memory saving, so they come before it. Each of these adds one shared helper. The migration of existing components, where there is one, is stacked on it and can be reviewed after the helper.
- [core] Share the hub status field decoding and on-change text publisher esphome#22316
[core] Share the hub status field decoding and on-change text publisher(mergeable): register hubs describe a status field as a table row that reads like the datasheet (cg.RegisterField), instead of hand-written bit decoding and a text publisher in each component. - [core] Add a builder for grouped change-trigger automations esphome#23285
[core] Add a builder for grouped change-trigger automations(mergeable; dev merged in after [fan] Build the change triggers as inline callback automations esphome#23280 landed, so the diff is the helper and its users alone): one codegen call builds the triggers that fire on a change or an edge (on_turn_on, on_opened, on_speed_set and the like), so an entity component lists its triggers in a small table instead of writing a trigger class for each. Light, cover and fan use it here.
4. Significant memory savings
- [esp8266] Keep the C library's TZ parser and the scanf engine out of the build esphome#22966
[esp8266], [rp2] Keep the C library's TZ parser and the scanf engine out of the build esphome#22967[rp2], [libretiny] Keep the C library's TZ parser and the scanf engine out of the build esphome#22968[libretiny]and [nrf52] Keep the C library's TZ parser and the scanf engine out of the build esphome#22969[nrf52]Keep the C library's TZ parser and the scanf engine out of the build(mergeable, hardware tested): any build that formats a date (strftime(), sowireguard,timedisplays and logs) still linked the C library's TZ parser and scanf engine, for aTZvariable ESPHome never sets. Wrapping that reload to a no-op saves about 5.5 KB flash and 144 B RAM on ESP8266, 5.9 KB on RP2040, 3.7 to 5.7 KB on LibreTiny and 9.3 KB on nRF52. The ESP32 version, [esp32] Keep picolibc's TZ parser and the scanf engine out of ESP-IDF 6 builds esphome#22965, merged. - [core] Keep MQTT entity callback lists inline esphome#23304
[core] Keep MQTT entity callback lists inline(hardware tested; [light] Build the light triggers as inline callback automations esphome#23283 is merged): each entity that MQTT exposes no longer allocates its own heap block at setup, so the ESP8266 MQTT test config has 288 B more free heap and 448 B less flash. Builds without MQTT do not change. - [core] Parse floats without newlib's strtod esphome#22677
[core] Parse floats without newlib's strtod(hardware tested), with [dfrobot_sen0609][hydreon_rgxx] Parse floats with str_to_float esphome#22678[dfrobot_sen0609][hydreon_rgxx] Parse floats with str_to_floatand [ci] Flag libc float parsing in ci-custom esphome#23410[ci] Flag libc float parsing in ci-customstacked on it: ESPHome's own float parser replaces newlib'sstrtod, saving 4.2 KB flash on ESP8266, 6.9 KB on LN882H and about 10.5 KB on BK72xx (BK7238 included, where the SDK'sstrtofcalls are wrapped). ESP-IDF 6 and RTL8720C keep libc's smallerstrtofand do not grow. It also fixes RP2350 parsing float denormals as 0, and RTL8720C accepting text such asunavailableas 0. [ci] Flag libc float parsing in ci-custom esphome#23410 keeps new code from calling libc's float parsers again. - [core] Store small scheduler callbacks inline instead of in std::function esphome#23420
[core] Store small scheduler callbacks inline instead of in std::function(hardware tested), with [esp32_ble_client] Make run_later a template that forwards to defer esphome#23411[esp32_ble_client] Make run_later a template that forwards to deferand [sprinkler] Schedule valve timers with an index lambda instead of a std::function copy esphome#23421[sprinkler] Schedule valve timers with an index lambda instead of a std::function copy:set_timeout,set_intervalanddeferno longer wrap every lambda in astd::function. A trivially copyable lambda of up to 12 bytes sits in the scheduler item's existing 16-byte slot, so nostd::functioncode is generated per lambda and 9 to 12 byte captures stop allocating on each schedule. Flash: ratgdo (ESP8266) -2.4 KB, an ESP8266 web_server config -336 B, ESP32-C3 -370 B; RAM is unchanged, and the scheduler benchmarks run 5 to 11% faster. Callers do not change. The two companion PRs move the last in-treestd::functionforwarders onto lambdas (sprinkler also saves 64 B RAM).
5. Performance
- [esphome] Inflate compressed OTA uploads about 5 times faster esphome#21641
[esphome] Inflate compressed OTA uploads about 5 times faster(mergeable, hardware tested): on older BK72xx chips, inflating a compressed OTA upload was slow enough that compression made uploads slower than sending raw on a fast link. With a table lookup in place of reading each Huffman code one bit at a time, a BK7231N goes from 3.8 to about 0.74 µs per inflated byte, so a 2.25 MB UF2 costs about 1.7 s of CPU instead of 8.7 s. It costs about 740 B of flash, and 1.1 KB of heap only while a compressed upload runs; the wire protocol is unchanged.
Completed
1. Review skill improvements for incoming PRs
- [ai] Ask for a hardware test report on device changes esphome#23193
[ai] Ask for a hardware test report on device changes(merged 2026-11-23): the automated review asks every PR that changes what a device does for a hardware test report, either thehardware-testskill's comment or a manual one (commit, board, steps including how the changed path was triggered, log lines, and the same steps ondevfor a fix), instead of accepting "compiles and runs on my board". Contributors' agents run the skill on their own and post its results once the PR is open, so fixes arrive with evidence the changed code ran. - [ai] Add the new shared helpers to AGENTS.md and the review skill esphome#23064
[ai] Add the new shared helpers to AGENTS.md and the review skill(merged 2026-11-22): the automated review now asks contributors for the helpers merged since [ai] Add the cleanups reviews keep missing to AGENTS.md and the review skill esphome#22708 instead of accepting the hand-written code each replaces. - [ai] Add the cleanups reviews keep missing to AGENTS.md and the review skill esphome#22708
[ai] Add the cleanups reviews keep missing to AGENTS.md and the review skill(merged) - [ci] Request Copilot reviews as the review bot so every contributor PR gets one esphome#22886
[ci] Request Copilot reviews as the review bot so every contributor PR gets one(merged): every ready contributor PR now gets a Copilot review, even when its author has no Copilot seat (Decide whether to request Copilot reviews on every esphome/esphome PR #204).
Nearly every incoming PR eventually gets the automated review, so this helps with almost all of them. It adds to AGENTS.md (which Copilot reads) and the code-review skill the cleanups that multi-pass reviews keep finding in contributor PRs and the automated reviewer almost never flags: copied state, dead guards, member layout, codegen precompute, two-way tables, log noise, final, and parametrized tests. Each pattern came up on at least 3 of 119 contributor PRs. Now that it has merged, the automated review catches these on the first pass, so a human review no longer needs extra rounds to find them. It also points contributors at the shared helpers below.
2. Crash and use-after-free fixes
-
[async_tcp] Bump RPAsyncTCP to 1.3.2-esphome.2 esphome#23377
[async_tcp] Bump RPAsyncTCP to 1.3.2-esphome.2(merged 2026-11-27, hardware tested; a dependency pin only): on RP2040 the web server hung until the watchdog reset the board when ESPAsyncWebServer aborted a malformed request inside the receive callback, because the library then used the connection lwIP had freed. On a Pico 2 W the old pin hung 8 times in 30 rounds, the new one never. The library fix is Detach callbacks before aborting so lwIP never uses a freed pcb esphome-libs/RPAsyncTCP#1; the ESP8266 counterpart (ESP8266AsyncTCP 2.2.3) rides in [async_tcp][esp8266][mqtt] Add ESP8266 MQTT TLS support esphome#14855. -
[web_server] Serve /events with ESPHome's own sessions on ESP8266, RP2040 and LibreTiny esphome#22695
[web_server] Serve /events with ESPHome's own sessions on ESP8266, RP2040 and LibreTiny, the fix (merged 2026-11-26; hardware tested on RP2040: dev crashed 11 times in 800 open and close cycles, the PR none). It sat on these PRs, which are all merged:- [web_server_idf] Add a long lived streaming response that components can use esphome#21973
[web_server_idf] Add a long lived streaming response that components can use(merged 2026-11-20) - [web_server] Send each /events client's entity listing only to that client on ESP32 esphome#22691
[web_server] Send each /events client's entity listing only to that client on ESP32(merged 2026-11-25) - [web_server] Move the ESP32 /events layer to web_server/event_source esphome#22694
[web_server] Move the ESP32 /events layer to web_server/event_source(moves code, no change in behaviour, merged 2026-11-26)
[web_server] Build /events state documents in the stack arena on LibreTiny esphome#22699
[web_server] Build /events state documents in the stack arena on LibreTiny, stacked on it, is merged into dev too (2026-11-26).On ESP8266, RP2040 and LibreTiny, the library's event source frees clients from network callbacks while the main loop walks them. That causes a use-after-free, races and crashes: the RP2 crash when streams open and close quickly ([web_server] Fix the RP2 crash when /events streams open and close quickly esphome#22690), the ESP8266 crash in
AsyncEventSource::sendand the LibreTiny task race. Once it merges, every platform runs the one ESPHome/eventsimplementation, where network callbacks only set flags and the main loop owns, writes and deletes every connection. It also drops the library's three allocations per event per client. - [web_server_idf] Add a long lived streaming response that components can use esphome#21973
-
[ota] Reject an ESP8266 web upload that lost bytes instead of flashing it esphome#23225
[ota] Reject an ESP8266 web upload that lost bytes instead of flashing it(merged 2026-11-25, milestone 2026.11.1): a web OTA upload that lost bytes was flashed anyway and left the device unbootable until reflashed over serial; it is now rejected and the running firmware stays -
[lvgl] Generate lvgl actions and conditions as inline actions esphome#23095
[lvgl] Generate lvgl actions and conditions as inline actions(merged 2026-11-22): besides about 3.7 KB less RAM per lvgl config, it fixeslvgl.canvas.draw_textwith aformat:or lambda text, broken since 2026.4.0. The text's temporary string was freed before the canvas layer drew it: blank or garbage text on host, and on an ESP32 a hang inlv_canvas_finish_layer()until the task watchdog resets the board, on every boot when the text is drawn at startup. -
[core] Convert UTC epochs without libc's gmtime esphome#22982
[core] Convert UTC epochs without libc's gmtime(merged): on dev,localtime_r()on an out-of-range 64-bit time with a time zone hung until the watchdog reset the board (seen on ESP8266, ESP32 and RP2350), and dates before 1970 gave wrong timestamps. It also saves 1.4 KB flash on ESP8266, 0.8 KB on ESP32 and 0.7 KB on RP2040, and the heap block newlib'sgmtime()allocated and never freed.
3. Helpers that make contributor PRs smaller and reduce long term review burden
- [climate_ir] Move IR climate mode and fan mappings to the shared code table esphome#22710
[climate_ir] Move IR climate mode and fan mappings to the shared code table(merged 2026-11-27, hardware tested): moves 17 IR climate components onto the table from [climate_ir] Add a shared PROGMEM code table for mode and fan mappings esphome#22709, each smaller on ESP8266. - [components] Flatten frame format options so declarations read without stair steps esphome#23337
[components] Flatten frame format options so declarations read without stair steps(merged 2026-11-26): the frame format options of theLengthFrameReaderfrom [core] Add LengthFrameReader for frames that give their own length esphome#22884 become flat named options (CheckFirstBytes,WarnIfLongerThan,FrameMinLength) instead of nested wrappers, so a new UART component's frame format reads in one or two lines instead of a stair-stepped block. All 17 users move over; RAM is unchanged and flash is identical except two seeed radars (+16 and +32 B), which drop their custom length rules. It changes an API that is only on dev, so nothing released breaks. - [climate_ir] Add a shared PROGMEM code table for mode and fan mappings esphome#22709
[climate_ir] Add a shared PROGMEM code table for mode and fan mappings(merged 2026-11-26, hardware tested): IR climate components map modes and fans with one table for both directions, instead of twoswitchblocks each. [climate_ir] Move six more IR climate mode and fan mappings to the shared code table esphome#23338 (merged 2026-11-26) moved six more onto it; the main migration, [climate_ir] Move IR climate mode and fan mappings to the shared code table esphome#22710, merged 2026-11-27. - [core] Read frames that carry their own length with LengthFrameReader esphome#22885
[core] Read frames that carry their own length with LengthFrameReader(merged 2026-11-25): moves the components that write this framing by hand onto the reader from [core] Add LengthFrameReader for frames that give their own length esphome#22884, so the same framing bugs stop getting fixed one component at a time (the LD24xx radars alone needed eight PRs). - [core] Add LengthFrameReader for frames that give their own length esphome#22884
[core] Add LengthFrameReader for frames that give their own length(merged 2026-11-25): one reader for binary frames with a length field, with header matching, resync and recovery of the good frames inside a rejected or stalled one. A new UART component declares its frame format in one line instead of writing the framing by hand. The migration of existing components, [core] Read frames that carry their own length with LengthFrameReader esphome#22885, merged the same day. - [core] Accept enums and wide integers in PROGMEM_STRING_TABLE lookups and default the fallback esphome#22860
[core] Accept enums and wide integers in PROGMEM_STRING_TABLE lookups and default the fallback(merged 2026-11-20): a name lookup is nowget_log_str(mode)instead of a cast, a range guard andName::LAST_INDEXat every call. [ds3231][es9038q2m_katana][lis2dw12][npm1300][sy6970][tmc22xx] Look up log names in PROGMEM string tables esphome#22855, [adc][dfrobot_sen0609][ens210][mhz19][mlx90393][selec_meter] Look up log names in PROGMEM string tables esphome#22856 and [display_menu_base][mitsubishi_cn105][remote_base][uln2003][voice_assistant] Look up log names in PROGMEM string tables esphome#22857 (merged) moved 17 components' hand-writtenswitchblocks onto these tables. - [sensor] Add measurement presets for sensor_schema esphome#22066
[sensor] Add measurement presets for sensor_schemaand [sensor] Use measurement presets in sensor_schema calls esphome#22068[sensor] Use measurement presets in sensor_schema calls(merged 2026-11-22):sensor.sensor_schema(kind=sensor.TEMPERATURE)replaces the unit, device class, state class and usualaccuracy_decimalseach component wrote out, across about 780 call sites in 228 components. - [core] Add cv.time_period_enum esphome#21922
[core] Add cv.time_period_enumand [components] Use cv.time_period_enum for fixed time period options esphome#21925[components] Use cv.time_period_enum for fixed time period options(merged 2026-11-22): one validator for options limited to fixed time periods, in place of a hand-written validator in each of 10 components, so the language schema lists the allowed values. - [core] Add setup_output_pin to set up an output pin at a known level esphome#23016
[core] Add setup_output_pin to set up an output pin at a known leveland [components] Set up output pins with setup_output_pin esphome#23017[components] Set up output pins with setup_output_pin(merged 2026-11-22): one call sets up an output pin at a known level, null-safe for optional pins. - [core] Add pulse_pin to drive a short pulse on an output pin esphome#23032
[core] Add pulse_pin to drive a short pulse on an output pinand [components] Pulse clock, latch and reset pins with pulse_pin esphome#23033[components] Pulse clock, latch and reset pins with pulse_pin(merged 2026-11-22), with [pn71xx][tas58xx] Drive the reset pulses with pulse_reset esphome#23036 moving tas58xx and pn71xx ontopulse_reset()(merged 2026-11-22). - [core] Add HighFrequencyLoopRequester::set to request the fast loop from a condition esphome#23030
[core] Add HighFrequencyLoopRequester::set to request the fast loop from a conditionand [a4988][epaper_spi][it8951][tmc22xx][uln2003][vnc] Request the fast loop with HighFrequencyLoopRequester::set esphome#23031 (merged 2026-11-22):high_freq_.set(condition)replaces theifthat picksstart()orstop().
4. Significant memory savings
- [improv_serial] Use the logger console API and drop RAM held between sessions esphome#22597
[improv_serial] Use the logger console API and drop RAM held between sessions(merged 2026-11-27, hardware tested): uses the console API from [logger] Pick the console port at build time to drop the unused UART driver, add a console API esphome#22596 (merged), so improv_serial no longer holds its own UART state between sessions. With [logger] Pick the console port at build time to drop the unused UART driver, add a console API esphome#22596, a device that logs over USB saves 10.1 KB flash and 932 B RAM on an ESP32-S2 with USB CDC and improv_serial. - [fan] Build the change triggers as inline callback automations esphome#23280
[fan] Build the change triggers as inline callback automations(merged 2026-11-27, hardware tested): the six fan change triggers no longer need an object each, saving 24 B RAM and 112 to 120 B flash with one trigger, and 176 B RAM and about 1.1 KB flash with all six. - [light] Build the light triggers as inline callback automations esphome#23283
[light] Build the light triggers as inline callback automations(merged 2026-11-26, hardware tested): on_turn_on, on_turn_off and on_state no longer need a trigger object each. The light test config uses 112 B less RAM and 376 to 736 B less flash, and publishing a light state to one listener takes less time than on dev on both ESP8266 and ESP32. - [core] Keep App entity, device and area lists in flash esphome#23234
[core] Keep App entity, device and area lists in flash(merged 2026-11-25, hardware tested): every device saves RAM (64 to 704 B measured) and flash; the lists codegen already knows become constant arrays, and App shrinks by 196 B. - [api] Generate api.respond as an inline action esphome#23089
[api] Generate api.respond as an inline action(merged 2026-11-22), first of thestd::functionset: 0.6 to 0.75 KB RAM and 5 to 8 KB flash per config with responding actions; also makesapi.respondinsiderepeat:answer at all. - [http_request] Hold the json: lambda in a function pointer esphome#23090
[http_request] Hold the json: lambda in a function pointer(merged 2026-11-25, hardware tested), the last of thestd::functionset. - The rest of the
std::functionset (merged 2026-11-24), all hardware tested with output identical todev: each holds a generated lambda in a plain function pointer or generates the action inline, saving RAM per use and the per-call heap allocationsstd::functionmade for larger captures.- [json][mqtt] Run JSON build lambdas without std::function esphome#23093
[json][mqtt] Run JSON build lambdas without std::function: no allocation per MQTT publish for lambdas with larger captures (an event publish goes from 4 allocations to 1). - [modbus_server] Store register and bit lambdas as function pointers esphome#23092
[modbus_server] Store register and bit lambdas as function pointers: a register drops from 40 to 16 bytes and its heap blocks, about 0.45 KB RAM and 5 KB flash on the test config. - [addressable_light] Hold the pixel mapper in a function pointer esphome#23094 (
addressable_light), [lvgl] Hold lvgl number, switch and text lambdas as function pointers esphome#23097 (lvgl entities), [display_menu_base] Hold the value lambda in a function pointer esphome#23098 (display_menu_base), [combination] Hold source coefficients as function pointers esphome#23099 (combination), [duty_time] Hold the lambda in a function pointer esphome#23100 (duty_time), [vbus] Hold custom message parsers as function pointers esphome#23101 (vbus).
- [json][mqtt] Run JSON build lambdas without std::function esphome#23093
- [logger] Pick the console port at build time to drop the unused UART driver, add a console API esphome#22596
[logger] Pick the console port at build time to drop the unused UART driver, add a console API(merged): a device that logs over USB no longer links the ESP-IDF UART driver it never uses. - [esp32] Keep picolibc's TZ parser and the scanf engine out of ESP-IDF 6 builds esphome#22965
[esp32] Keep picolibc's TZ parser and the scanf engine out of ESP-IDF 6 builds(merged): about 6 KB flash in any ESP-IDF 6 build that formats a date, and it fixed the groupedesp32_bleCI link failure after the ESP-IDF 6.1.1 default bump.
Process
- Add a PR here when its value is clearly larger than its review cost, and say why in one or two lines. Crash and use-after-free fixes, and new helper PRs that make contributor PRs smaller and reduce long term review burden, always qualify.
- Keep the list in priority order.
- When a PR merges, move it to Completed under the same category. A category with nothing left open says - no open PRs -. Close this issue when every category has no open PRs.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsOngoing
Activity