mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
41e09c1e6c1afc8c0419ea42d0c1a47625fa96eb
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.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
597 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
