XL9535 I/O Expander¶
The XL9535 component allows you to use XL9535 I/O expander in ESPHome. It uses I²C Bus for communication.
Once configured, you can use any of the 16 available 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.
This I/O Expander chip is used in the Lilygo T-RGB 2.1” Round Display
# Example configuration entry xl9535: - id: xl9535_hub address: 0x20 # Individual outputs switch: - platform: gpio name: XL9535 Pin 0 pin: xl9535: xl9535_hub number: 0 mode: output: true inverted: false
id (Required, ID): The id to use for this
address (Optional, int): The I²C address of the driver. Defaults to
Pin configuration variables:¶
xl9535 (Required, ID): The id of the
xl9535component 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
mode (Optional, string): A pin mode to set for the pin at. One of