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 entry
tca9555:
  - id: 'TCA9555_hub'

# Individual outputs
switch:
  - platform: gpio
    name: "TCA9555 Pin #0"
    pin:
      tca9555: tca9555_hub
      # Use pin number 0
      number: 0

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.

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 INPUT or OUTPUT.

See Also