HUSB238 USB Power Delivery Sink
The Hynetek HUSB238 (product page, datasheet) is a USB Power Delivery (PD) controller that works as a sink, for power ratings up to 100 W. It is compatible with PD 3.0 and Type-C 1.4, and it also supports Apple Divider 3, BC1.2 SDP, CDP and DCP sources.
The husb238 component reads the chip status over the I²C Bus. The chip answers
only at I²C address 0x08.

# Example configuration entryhusb238:Configuration variables
Section titled “Configuration variables”- id (Optional, ID): Manually specify the ID used for code generation.
- address (Optional, int): The I²C address of the chip, which is
0x08on every HUSB238. Defaults to0x08. - i2c_id (Optional, ID): Manually specify the ID of the I²C Bus if you are using multiple I²C buses.
- update_interval (Optional, Time): The interval to read the chip
status. Defaults to
1s.
Binary Sensor
Section titled “Binary Sensor”The husb238 binary sensor platform reports whether a USB-C source is attached and which CC line is in use.
Both sensors are diagnostic entities by default.
binary_sensor: - platform: husb238 attached: "Source Attached" cc_direction: name: "CC Direction"Configuration variables
Section titled “Configuration variables”- husb238_id (Optional, ID): The ID of the
husb238component. Only needed if you have more than one. - attached (Optional): On while a USB-C source is attached, whether or not it negotiated PD. Accepts either a name string or all options from Binary Sensor.
- cc_direction (Optional): Shows which CC line is in use: off for CC1, on for CC2. The state is unknown while nothing is attached. Accepts either a name string or all options from Binary Sensor.