Commit Graph
14225 Commits
Author SHA1 Message Date
J. Nick Koston aeb8e9413b Clear latched MCP23xxx interrupts during setup, fix uint8_t truncation
- MCP23008/MCP23S08: Read GPIO register before attaching ISR to clear
  any latched interrupt from a previous MCU run (chip may stay powered)
- MCP23017/MCP23S17: Read both GPIOA and GPIOB to clear latched state
- PI4IOE5V6408: Add explicit static_cast<uint8_t> for ~mode_mask_ to
  avoid implicit int-to-uint8_t truncation
2026-04-04 10:21:28 -10:00
J. Nick Koston 1e9e5ca763 Fix pin_interrupt_mode overriding auto-enabled CHANGE interrupt
MCP23XXXGPIOPin::setup() calls pin_interrupt_mode(pin, NO_INTERRUPT)
after pin_mode() already auto-enabled CHANGE, undoing the auto-enable.
Skip the explicit pin_interrupt_mode call when interrupt_pin is
configured and the user didn't override the default.
2026-04-04 10:05:00 -10:00
J. Nick Koston 85036d64d9 Fix MCP23x17 MIRROR bit, add dump_config logging, and clear PI4IOE5V6408 latched interrupts
- MCP23017/MCP23S17: Enable MIRROR bit in IOCON when interrupt_pin is
  configured so INTA and INTB are ORed together, allowing a single
  interrupt wire to catch changes on all 16 pins
- All MCP23xxx variants: Log interrupt_pin in dump_config for debugging
- PI4IOE5V6408: Read interrupt status register during setup to clear
  any latched state that could hold INT line low
- MCP23XXXBase: Move setup_interrupt_pin_() to protected visibility
2026-04-04 10:03:40 -10:00
J. Nick Koston 8234512a89 Auto-enable chip-level interrupts for input pins
- MCP23x08/x17: auto-enable CHANGE interrupt mode in pin_mode() when
  interrupt_pin is configured, so users don't need to manually set
  interrupt: CHANGE on every pin
- PI4IOE5V6408: write interrupt enable mask for input pins in
  write_gpio_modes_() when interrupt_pin is configured
2026-04-04 09:44:59 -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 3773ff9a98 Fix clang-tidy: rename setup_interrupt_pin_ to setup_interrupt_pin 2026-04-04 09:17:29 -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 9f3fb37d12 Remove duplicate @brief line in cached_gpio.h 2026-04-04 08:59:09 -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 a2120953b9 [gpio_expander] Rename interrupt_driven_ to invalidate_on_read_
The base class doesn't need to know about interrupts — it just controls
whether digital_read() self-invalidates cache entries. Rename the flag
and invert the polarity for clarity.
2026-04-04 08:43:16 -10:00
J. Nick Koston cf7bed8b6c [gpio_expander] Keep cache valid in interrupt-driven mode
When interrupt_driven_ is set, digital_read() no longer self-invalidates
each pin's cache entry. The cache stays valid until reset_pin_cache_()
is called from loop() when an interrupt fires. This eliminates I2C reads
on every binary sensor loop iteration — only reading when pins actually
change.
2026-04-04 08:38:35 -10:00
J. Nick Koston 79fe3de912 [pcf8574][pca9554] Add optional interrupt pin to eliminate polling
Add interrupt_pin config option to PCF8574 and PCA9554 GPIO expander
components. When configured, the component disables its loop and only
wakes on interrupt, eliminating continuous I2C polling when no pins
have changed state.
2026-04-04 08:22:37 -10:00
Clyde Stubbs 1a1725f958 [esp32] Clean build when sdkconfig options change (#15439) 2026-04-04 09:11:29 -04: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 f51871fa6b [total_daily_energy] Replace loop() with timeout-based midnight reset (#15432) 2026-04-04 00:37:50 -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 b0d39aedd3 [hlw8012] Change periodic sensor reading logs to LOGV (#15431) 2026-04-04 00:30:29 -10:00
Clyde Stubbs 89de00e7ce [online_image] Clear LVGL dsc when image size changes. (#15360) 2026-04-04 17:04:01 +11: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 2337767c38 [modbus_controller] Fix format specifier warnings (#15429) 2026-04-03 16:37:31 -10:00
J. Nick Koston 4f2290d548 [web_server] Disable loop when no SSE clients are connected (#15428) 2026-04-03 16:37:20 -10:00
Clyde Stubbs 7ab26a4fe0 [ili9xxx][st7735] Add deprecation warnings (#15416) 2026-04-04 13:21:58 +11:00
dependabot[bot] 533eeabf1d Bump aioesphomeapi from 44.8.1 to 44.9.0 (#15425)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 23:17:49 +00: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
dependabot[bot] f8f65c1a7b Bump click from 8.3.1 to 8.3.2 (#15421)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 09:42:37 -10:00
J. Nick Koston d90e2a6a9a [core] Use __builtin_ctz for FiniteSetMask bit scanning (#15400) 2026-04-03 08:28:54 -10:00
J. Nick Koston 4969fd6e99 [light] Use reciprocal multiply in normalize_color (#15401) 2026-04-03 08:28:41 -10:00
J. Nick Koston 95683b7416 [light] Pass LightTraits to avoid redundant virtual get_traits() calls (#15403) 2026-04-03 08:28:29 -10:00
J. Nick Koston 38f4dc3217 [uptime] Pass known length to publish_state to avoid redundant strlen (#15410) 2026-04-03 08:28:07 -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
J. Nick Koston 2a5933e4f7 [host] Add graceful shutdown on SIGINT/SIGTERM (#15387) 2026-04-03 08:27:13 -10:00
Jonathan Swoboda 6fecd72049 [ezo_pmp] Fix change_i2c_address action using wrong template type (#15393) 2026-04-03 08:35:16 -04:00
Clyde Stubbs 8360502a94 [ci] Fix deprecated-component matcher (#15417) 2026-04-03 08:01:04 -04:00
Jonathan Swoboda 5548a32771 [ili9xxx] Fix SPI MOSI pin validation never executing (#15399) 2026-04-03 21:15:51 +11:00
Clyde Stubbs 6f05e3d204 [ci] Run ci-custom.py as a pre-commit check (#15411) 2026-04-03 12:54:44 +11:00
Jonathan Swobodaandclydebarrow bcd8ddeabe [lvgl] Fix ext_click_area property application (#15394)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2026-04-03 12:44:54 +11:00
Clyde Stubbs af662da90d [mipi_spi] Rotation and buffer size changes (#15047) 2026-04-03 12:28:45 +11:00
Keith Burzinski 710186998b [ota] Use modernized namespace syntax (#15398) 2026-04-02 19:12:05 -04:00
J. Nick Koston be3e0c27bf [core] Inline fast path for enable_loop (#15392) 2026-04-02 21:28:12 +00:00
Jonathan Swoboda 4d0d3cc271 [sen5x] Remove dead voc_baseline config option (#15391) 2026-04-02 10:53:53 -10:00
Jonathan Swoboda 4134763f34 [at581x][canbus] Fix walrus operator skipping falsy config values (#15390) 2026-04-02 20:32:10 +00:00
1e72f0ee5a [nextion] Gate waveform code behind USE_NEXTION_WAVEFORM, use StaticRingBuffer (#15273)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-04-02 20:17:20 +00:00
J. Nick Koston 63710a4cb7 [spi] Add spi0 and spi1 to reserved IDs for RP2040 compatibility (#15388) 2026-04-02 16:10:16 -04: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
Jonathan Swoboda 90624e6eca [deep_sleep] Fix wakeup_pin_mode rejecting lowercase on ESP32/BK72XX (#15384) 2026-04-02 09:34:27 -10:00
Jonathan Swoboda 6b89998b60 [template] Fix cover position_action overridden by has_position default (#15379) 2026-04-02 09:29:33 -10:00
Jonathan Swoboda dde472b0cf [pipsolar] Fix set_level action passing string to cv.use_id (#15380) 2026-04-02 09:28:44 -10:00