How to configure a smart LED so that it is manageable via the frontend?


#1

I have a “smart LED” bulb (AITHINKER's AI_LIGHT, but I think this is a broader class of LEDs) which I flashed with ESPurna and presented to HA in configuration.yaml as (taken from ESPurna interface)

  - name: ch2_lampe_pixar
    platform: mqtt
    state_topic: ch2-lampe-pixar/relay/0
    command_topic: ch2-lampe-pixar/relay/0/set
    payload_on: 1
    payload_off: 0
    availability_topic: ch2-lampe-pixar/status
    payload_available: 1
    payload_not_available: 0
    brightness_state_topic: ch2-lampe-pixar/brightness
    brightness_command_topic: ch2-lampe-pixar/brightness/set
    rgb_state_topic: ch2-lampe-pixar/rgb
    rgb_command_topic: ch2-lampe-pixar/rgb/set
    color_temp_command_topic: ch2-lampe-pixar/mired/set
    white_value_state_topic: ch2-lampe-pixar/channel/3
    white_value_command_topic: ch2-lampe-pixar/channel/3/set

I then created two cards for it: a Light card and an Entity card:

image

None of them is perfect: the entity card only allows to switch on and off and the light card acts strange: one cannot switch it on/off by clicking on it, only by sliding the marker around. Then to switch it off I need to use the entity card.

My question: how should such a bulb be configured? Specifically: how to make it appear as a normal lamp (which can be switched on and off), with a settable brightness and colors - in Lovelace?


#2

If you tap the bulb on your light card it will turn on and off. Works just fine for me


#3

Ah, right. It has to be pressed slightly longer than the entity (a quick tap does nothing). Thanks for that.

Now I am left with the colors choice - how do you do that? OK, found it - it is in the “three dots” menu on the top of the card


#4

Or long press the bulb


#5

This does not work, unfortunately. I see a square (of the size of the bulb) flashing once under my finger but nothing appears.


#6

Works for my TP-Link and Tuya light bulbs