Flux_led ability to control speed and more effect


I’d like to request some more feature for the flux_led component
It seems absurd that we are not able to control the speed of the effects from HA, while it is totally possible from the MagicHome app… also, it would be awesome if we could have more effects

Flux_LED - Programs working, but can't control speed strobe speed?

Would like to see this functionality too. The default strobe speed is too slow. Also the app allows you to change the strobe speed so it should be ported to HA.


Still not available in .83.2…next update??


I don’t think it’s even been taken into consideration by the developers, it’s not voted enough to be seen


In case someone takes a look at this request.

flux_led.py sends effects like so:

if effect in EFFECT_MAP:
self._bulb.setPresetPattern(EFFECT_MAP[effect], 50)

the 50, in this case is a speed setting. This need to be a variable the user can change between 1-100.

Sadly, I do not have the knowledge to fix this in python, or I would put in a pull request.


So changing this value changes the strobe speed? Have you tried this?


Yes. I copied the contents of flux_led.py and made a custom component called custom_components/light/led_flux.py

Then, changed the domain to ‘led_flux’ instead of flux_led. Now I have a light component called led_flux.

Since, I only want effects to blink quickly, I set the speed to 100 and it works for my setup.


sweet…I’ll try this


can you share the code?


I messed with this a bit today.

light.turn_on can’t have any more attribute types attached to it without changing a LOT of code. The thing that most likely would have to happen is to have flux_led do something similar to LIFX by creating a new service type just for setting the effect and speed and I may give that a shot later this weekend.

However, as a super quick workaround, I went with just upping the speed if it was a strobe effect and leaving it as 50 for everything else.

        # Effect selection                                                   
        if effect in EFFECT_MAP:                                             
            speed = 50                                                       
            if "strobe" in effect:                                           
                speed = 100                                                  
            self._bulb.setPresetPattern(EFFECT_MAP[effect], speed)           

I’ll post back if I do something a little more significant with going the service route instead.