TCA9555 I/O Expander
The TCA9555 component allows you to use TCA955 I/O expanders (datasheet) in ESPHome. It uses I²C Bus for communication.
Once configured, you can use any of the 16 pins (TCA9555) as pins for your projects. Within ESPHome they emulate a real internal GPIO pin and can therefore be used with many of ESPHome’s components such as the GPIO binary sensor or GPIO switch.
Any option accepting a Pin Schema can theoretically be used, but some more complicated components that do communication through this I/O expander will not work.
# Example configuration entrytca9555: - id: 'tca9555_hub' interrupt_pin: GPIOXX
# Individual outputsswitch: - platform: gpio name: "TCA9555 Pin #0" pin: tca9555: tca9555_hub # Use pin number 0 number: 0Configuration variables
Section titled “Configuration variables”- id (Required, ID): The id to use for this TCA9555 component.
- address (Optional, int): The I²C address of the driver.
Defaults to
0x21. - interrupt_pin (Optional, Pin Schema): The pin connected to the INT output of the TCA9555. When configured, the component becomes interrupt-driven instead of polling — it only reads the chip when a pin actually changes state, significantly reducing I²C bus traffic and CPU usage. The INT pin is active-low and open-drain, so an external or internal pull-up resistor is required. Must be an internal GPIO pin (not another expander pin).
Pin configuration variables
Section titled “Pin configuration variables”-
TCA9555 (Required, ID): The id of the TCA9555 component of the pin.
-
number (Required, int): The pin number.
-
inverted (Optional, boolean): If all read and written values should be treated as inverted. Defaults to
false. -
mode (Optional, string): A pin mode to set for the pin at. One of
INPUTorOUTPUT.