H-bridge Light

The hbridge light platform creates a dual color brightness controlled light from two float output component.


H-bridge lights are very common for Christmas lighting and they use 2 wires for a bunch of LEDs. The pins are switched alternatively to allow two sets of lights to operate.

# Example configuration entry
  - platform: hbridge
    id: mainlight
    name: "Hbridge Lights"
    pin_a: pina
    pin_b: pinb

Internally, H-bridge lights are implemented as cold/warm white lights. This means that the brightness of the two colors is mapped to the cold white and warm white values, even if the colors aren’t actually white in reality. To individually control the colors in the light control actions, you need to use the cold_white and warm_white options.

Configuration variables:

  • id (Optional, ID): Manually specify the ID used for code generation.

  • name (Required, string): The name of the light.

  • pin_a (Required, ID): The id of the first float Output Component to use for this light.

  • pin_b (Required, ID): The id of the second float Output Component to use for this light.

  • All other options from Light.


As we are switching the H-bridge in software, the light may glitch every so often when other tasks run on the MCU.

See Also