:description:Instructions for setting up MAX6956 port expanders in ESPHome.
:image:max6956.jpg
:keywords:MAX6956
The MAX6956 component allows you to use MAX6956 I/O expanders
(`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX6956.pdf>`__) in ESPHome. It uses :ref:`I²C Bus <i2c>` for communication.
The ``max6956`` exists in 2 versions 20 or 28 ports, depending on the packaging.
Once configured, you can use any of the 20 or 28 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. Interrupt-on-change for inputs is not possible.
Pins can also be individualy configured as led driver and used with Light components. Current value can be set globaly or for each pin, through 16 possible levels. Driving RGB
led requires 3 pins.
Any option accepting a :ref:`Pin Schema <config-pin_schema>` can theoretically be used.
Component/Hub
-------------
..figure:: images/max6956.jpg
:align:center
:width:80.0%
MAX6956 I/O Expander.
The ``max6956`` is an :ref:`I²C Bus <i2c>` slave. Its address is configured using A0 and A1 hardware pins from 0x40 to 0x4F.
..code-block:: yaml
max6956:
- id: max6956_1
address: 0x40
i2c_id: bus_a
Configuration variables:
************************
-**id** (**Required**, :ref:`config-id`): The id to use for this ``max6956`` component.
-**address** (*Optional*, int): The I²C address of the driver.
Defaults to ``0x40``.
-**i2c_id** (*Optional*): The I²C Bus ID
Defaults to ``false``
-**brightness_global** (*Optional*): Set the value of the current to be sink by all pins configured as led driver.