SM2335 LED driver

Component/Hub Copy link to header

The SM2335 component represents a SM2335 LED driver chain in ESPHome. Communication is done with two GPIO pins (DATA and CLK). It is used in some smart light bulbs:

  • SwitchBot Color Bulb W1401400

To use the channels of this components, you first need to setup the global sm2335 hub and give it an id, and then define the individual output channels.

# Example configuration entry
sm2335:
  data_pin: GPIOXX
  clock_pin: GPIOXX
  max_power_color_channels: 9
  max_power_white_channels: 9

Configuration variables: Copy link to header

  • data_pin (Required, Pin Schema): The pin used for DATA.
  • clock_pin (Required, Pin Schema): The pin which CLK is connected to.
  • id (Optional, ID): The id to use for this sm2335 component. Use this if you have multiple SM2335 chains connected at the same time.
  • max_power_color_channels (Optional, int 0-15): Adjusts the current supplied to the color channels, higher is more power. Default is 2 per SM2335 datasheet. See table below.
  • max_power_white_channels (Optional, int 0-15): Adjusts the current supplied to the white channels, higher is more power. Default is 4 per SM2335 datasheet. See table below.

Note

The LED driver may be able to tolerate more power than the bulb is designed to handle, start with lower values and increase slowly, comparing to a stock bulb to verify what is safe for your model.
max_power_white_channels valueactual current
05 mA
110 mA
215 mA
320 mA
425 mA (default)
530 mA
635 mA
740 mA
845 mA
950 mA
1055 mA
1160 mA
1265 mA
1370 mA
1475 mA
1580 mA
max_power_color_channels valueactual current
010 mA
120 mA
230 mA (default)
340 mA
450 mA
560 mA
670 mA
780 mA
890 mA
9100 mA
10110 mA
11120 mA
12130 mA
13140 mA
14150 mA
15160 mA

Output Copy link to header

The SM2335 output component exposes a SM2335 channel of a global Component/Hub as a float output.

# Individual outputs
output:
  - platform: sm2335
    id: output_red
    channel: 1

Configuration variables: Copy link to header

  • id (Required, ID): The id to use for this output component.
  • channel (Required, int): Chose the channel of the SM2335 chain of this output component.
  • sm2335_id (Optional, ID): Manually specify the ID of the Component/Hub. Use this if you have multiple SM2335 chains you want to use at the same time.
  • All other options from Output.

Note

This driver does support enabling of both the color and the white channels at the same time, but it is not encourage. Therefore, the Color Interlock should be set to true when using this driver for safest operation.

See Also Copy link to header

CURRENT