Commit Graph
3461 Commits
Author SHA1 Message Date
J. Nick Koston 411d2f8beb Merge remote-tracking branch 'upstream/dev' into integration 2026-04-04 22:11:48 -10:00
Clyde StubbsandJonathan Swoboda 4d2062282e [mipi_spi] Run spi final validation (#15418)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-04 21:11:49 -04:00
J. Nick Koston 2d9a42e4ba [pcf8574][pca9554] Add optional interrupt pin to eliminate polling (#15444) 2026-04-04 13:56:21 -10:00
J. Nick Koston 2b4448db02 Merge remote-tracking branch 'upstream/move-wake-to-core' into integration 2026-04-04 13:43:10 -10:00
J. Nick Koston 586196779b Merge remote-tracking branch 'upstream/gpio-expander-interrupt-pin-2' into integration 2026-04-04 13:43:06 -10:00
Boris KrivonogCopilotJ. Nick Kostonpre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
830517a98f [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 3) (#15437)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-04-04 12:40:05 -10:00
J. Nick Koston 18ad20a1bd Add binary sensors on interrupt-enabled hubs to exercise pin_mode path 2026-04-04 10:45:46 -10:00
J. Nick Koston e372440ed2 [core] Move wake_loop out of socket component into core
Wake primitives (esp_schedule, __sev, FreeRTOS task notifications)
are platform SDK functions that don't depend on the socket/network
stack. Move them to esphome/core/wake.h/.cpp so they work
unconditionally on all platforms.

This eliminates the require_wake_loop_threadsafe() boilerplate,
the USE_WAKE_LOOP_THREADSAFE define, and the socket AUTO_LOAD
entries that 12 components needed just to use wake.

wake_loop_threadsafe() and wake_loop_any_context() now just work
on every platform without opt-in.
2026-04-04 10:32:32 -10:00
J. Nick Koston d1e737280f Fix ESP8266 SPI test pin conflict: use GPIO0 for interrupt_pin 2026-04-04 09:18:04 -10:00
J. Nick Koston 41e09c1e6c [mcp23xxx][pi4ioe5v6408] Add optional interrupt pin to eliminate polling
Extend interrupt_pin support to MCP23008, MCP23017, MCP23S08, MCP23S17,
and PI4IOE5V6408 GPIO expander components. Same approach as PCF8574/PCA9554:
when configured, the component disables its loop and only wakes on interrupt,
and the cache stays valid between interrupts so binary sensors return from
cache instead of doing I2C/SPI reads every loop iteration.

For MCP23xxx, the interrupt_pin config and C++ logic lives in the shared
MCP23XXXBase template class, so all four variants (I2C 8/16-pin, SPI
8/16-pin) inherit it automatically.

Inspired by jesserockz's work in #11959 which proposed a more comprehensive
interrupt-driven approach with per-pin interrupt status register reading.
This implementation takes a simpler path by leveraging the existing
CachedGpioExpander cache invalidation mechanism.
2026-04-04 09:12:09 -10:00
J. Nick Koston ec11c17e74 Merge remote-tracking branch 'upstream/pcf8574-pca9554-interrupt-pin' into integration 2026-04-04 09:08:11 -10:00
J. Nick Koston 0afdc6df26 [pcf8574][pca9554] Add interrupt_pin to compile tests 2026-04-04 08:58:02 -10:00
J. Nick Koston 297f9c134f [time] Use set_interval for CronTrigger instead of loop() (#15433) 2026-04-04 01:07:16 -10:00
J. Nick Koston 9ee5089891 [time] Support */N syntax in cron expressions (#15434) 2026-04-04 00:30:41 -10:00
J. Nick Koston 269c234ac2 Merge remote-tracking branch 'upstream/api/peel-first-write-iteration' into integration 2026-04-03 23:48:58 -10:00
J. Nick Koston d795dc2f1c fix bench 2026-04-03 22:09:46 -10:00
J. Nick Koston fb4d488864 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-03 21:09:25 -10:00
alorenteandclydebarrow 53b6528cc5 [epaper_spi] Allow runtime rotation change (#15419)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2026-04-04 16:02:15 +10:00
Boris Krivonog 16ae753317 [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 2) (#15358) 2026-04-03 19:44:04 -10:00
J. Nick Koston 102a3e12fe Merge branch 'integration' of https://github.com/esphome/esphome into integration 2026-04-03 18:22:32 -10:00
J. Nick Koston 06966f5641 Merge branch 'cron-star-slash' into integration 2026-04-03 18:22:20 -10:00
J. Nick Koston c0cac732c7 Merge branch 'cron-trigger-interval' into integration 2026-04-03 18:22:14 -10:00
J. Nick Koston 90df902d09 [time] Support */N syntax in cron expressions 2026-04-03 18:20:53 -10:00
J. Nick Koston c3b8949696 Merge branch 'cron-trigger-interval' of https://github.com/esphome/esphome into cron-trigger-interval 2026-04-03 18:13:39 -10:00
J. Nick Koston f6f07ef147 [time] Use set_interval for CronTrigger instead of loop() 2026-04-03 18:11:45 -10:00
J. Nick Koston 89ff3491b6 [time] Use set_interval for CronTrigger instead of loop() 2026-04-03 18:10:17 -10:00
J. Nick Koston 945a6b1063 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-03 14:33:20 -10:00
J. Nick Koston ef41caa347 Merge branch 'api-proto-max-length' into integration 2026-04-03 14:16:20 -10:00
J. Nick Koston dd08d7631e [core] Add test for register_unit_of_measurement max length 2026-04-03 14:13:03 -10:00
Bonne EgglestonandJ. Nick Koston c6bb1fe141 [modbus] Add integration tests for server and server via controller (#14845)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-04-03 20:24:02 +00:00
J. Nick Koston 4d4ff0303d Merge remote-tracking branch 'upstream/dev' into integration 2026-04-03 10:03:23 -10:00
J. Nick Koston f2a0d9943d [benchmarks] Add host platform benchmarks for text_sensor and button (#15407) 2026-04-03 08:27:55 -10:00
J. Nick Koston ea0227a206 [benchmarks] Add host platform benchmarks for number, select, and switch (#15405) 2026-04-03 08:27:44 -10:00
J. Nick Koston 5a23669747 [scheduler] Fix unrealistic scheduler benchmarks missing periodic drain (#15396) 2026-04-03 08:27:29 -10:00
Clyde Stubbs af662da90d [mipi_spi] Rotation and buffer size changes (#15047) 2026-04-03 12:28:45 +11:00
J. Nick Koston 3ba41c6f7e Merge remote-tracking branch 'upstream/select-switch-logv-downgrade' into integration 2026-04-02 15:12:38 -10:00
J. Nick Koston 5e471f45be Merge remote-tracking branch 'upstream/button-logv-downgrade' into integration 2026-04-02 15:12:17 -10:00
J. Nick Koston 27522d7462 Add host platform benchmarks for text_sensor and button components 2026-04-02 14:57:39 -10:00
J. Nick Koston 2058eda7fa Address review: fix misleading comment, remove unused constants 2026-04-02 14:54:28 -10:00
J. Nick Koston 8a0d3158a0 Add host platform benchmarks for number, select, and switch components 2026-04-02 14:39:48 -10:00
J. Nick Koston 8f49aab070 Merge branch 'scheduler-cancel-fast-path' into integration 2026-04-02 12:23:15 -10:00
J. Nick Koston 4535b82483 [scheduler] Remove redundant Defer_UniqueID, keep anonymous + same-ID
UniqueID benchmark was unrealistic — unique IDs still ran
cancel_item_locked_ scanning all containers for matches that never
exist. Replace with just two meaningful defer variants:
- Defer: anonymous (nullptr name, skips cancel entirely)
- Defer_SameID: fixed ID (cancel-and-replace coalescing pattern)
2026-04-02 11:51:52 -10:00
J. Nick Koston ed14694e46 [scheduler] Add defer benchmark variants and fix anonymous defer path
- Scheduler_Defer: use nullptr name matching Component::defer(func)
  production pattern (skips cancel_item_locked_ entirely)
- Scheduler_Defer_SameID: fixed ID 0 measuring cancel-and-replace
  pattern for coalescing rapid updates
- Scheduler_Defer_UniqueID: unique IDs measuring cancel scan overhead
  when no match is found
2026-04-02 11:45:03 -10:00
J. Nick Koston ce5c36a02a [scheduler] Fix pool imbalance in benchmarks, add static_assert
Change kInnerIterations from 2000 to 2100 (divisible by batch sizes 3
and 10) to prevent pool imbalance at iteration boundaries that caused
spurious malloc. Add static_assert to each benchmark to catch this at
compile time.
2026-04-02 11:38:18 -10:00
J. Nick Koston 904577bf91 [scheduler] Extract warm_pool helper for scheduler benchmarks
Replace duplicated pool warmup blocks with a shared warm_pool() helper
that registers and replaces items twice to populate the recycling pool
before the benchmark loop begins.
2026-04-02 11:31:27 -10:00
J. Nick Koston 279686b1c2 [scheduler] Add ExceedPool benchmark to measure pool overflow cliff
Add Scheduler_SetTimeout_ExceedPool with batch size 10 (exceeding
MAX_POOL_SIZE=5) to measure the performance impact when the recycling
pool is exhausted and items must be malloc'd/freed each cycle.
2026-04-02 11:26:28 -10:00
J. Nick Koston 615b2b339a [scheduler] Batch 3 registrations per call() for realistic worst case
Instead of draining after every single registration or batching 5,
use a batch size of 3 which represents a realistic worst case where
multiple components schedule in the same loop iteration while staying
within the recycling pool (MAX_POOL_SIZE=5).
2026-04-02 11:24:53 -10:00
J. Nick Koston 347f981768 [scheduler] Fix unrealistic scheduler benchmarks missing periodic drain
Scheduler registration benchmarks (SetTimeout, SetInterval, Defer) were
not calling scheduler.call() periodically to drain and clean up cancelled
items. In production, call() runs every loop iteration, keeping the
scheduler containers small. Without draining, cancelled items accumulated
causing O(n²) scan cost in cancel_item_locked_ that doesn't reflect
real-world behavior.

- SetTimeout: was only calling process_to_add() (no cleanup), now calls
  call() every kKeyCount iterations
- SetInterval: was calling process_to_add() (no cleanup of items_), now
  calls call() for proper cleanup
- Defer: was never draining the defer queue, now calls call() to process
  deferred items as production does
- All three now advance time (++now) to match production loop behavior
2026-04-02 11:18:17 -10:00
J. Nick Koston 67238e3d74 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	tests/components/time/posix_tz_parser.cpp
2026-04-02 10:13:20 -10:00
c82166e5f3 [dsmr] Allow setting MBUS id for thermal sensors in DSMR component (#7519)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-04-02 10:06:49 -10:00