Light Effects

Hi,
I have a question, how do I add new lightning effects to the light class?
Situation:
I have self made lights with esp12 and ws2811 LEDs. Controlled with http. Now I have changed it to mqtt its working but the lamp have also effects like rainbow, fire and 15 other effects. I have tryed it with a bunch of mqtt switches for the effects. That worked but looks terrible in the UI. In the …/light/init.py are the definitions for the effects but I don’t won’t to edit this file. Is there a better way to add custom effects?

Thanks

I would probably ask in the gitter chat or complement this issued with more precisely what you would like to add.

Another option would to use the input select combined with some automation to change to the chosen effect from your list. This could be used with your current MQTT solution.

The existing light effects are supported natively by some (not all) of the bulbs themselves, I don;t think there is any code to actually implement them in HA.

1 Like

Is it possible to implement a own light class with more effects?

Resurrecting this very old thread as I have the same question. Is it true that all the light effects in HA are implemented in the platforms themselves (e.g. Hue implements colorloop natively)? I created my own custom effects using Pyscript. It works well for me and I’m interested in contributing back to HA if there’s a logical place for it to land. I searched through the core source code, and although I found references to effect names in specific integrations, I don’t see any implementations, which leads me to think this is indeed implemented in the bulbs themselves.

1 Like

If anyone’s interested, I ended up creating my own solution using Pyscript. Works well for my use case.

1 Like