Skip to content
Get started

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.

HUSB238 breakout board
HUSB238 breakout board from Adafruit
# Example configuration entry
husb238:
  • id (Optional, ID): Manually specify the ID used for code generation.
  • address (Optional, int): The I²C address of the chip, which is 0x08 on every HUSB238. Defaults to 0x08.
  • 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.

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"
  • husb238_id (Optional, ID): The ID of the husb238 component. 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.