CorneliousJD / Flux_LED

Modifies homeassistant/components/flux_led/light.py to fix issue where LED lights using MagicHome controller turn off immediately after turning them on with V8 firmware.
25 stars 11 forks source link

Support for RGBW and White controllers with Firmware v5 #4

Closed sk-smartdom closed 2 years ago

sk-smartdom commented 3 years ago

As you suspected there is a problem when different controllers coexist. In my case i bought a bunch of White, RGB and RGBW controllers

All RGB are v8 and all White and RGBW are still v5

when i used YOUR code for RGB i had problems with others (turning on from HA did not work for RGBW and White)

So i looked in the code and i think i found a sollution just where you modified it i added some code in turn_on function just AFTER your modification:

# if not self.is_on: # self._bulb.turnOn() if self._mode == MODE_RGBW and not self.is_on: self._bulb.turnOn()
if self._mode == MODE_WHITE and not self.is_on: self._bulb.turnOn()

Basicly it applies YOUR modified behaviour only for RGB, and for White and RGBW (with v5) it works as in standard integration. Maybe it is worth to add this modification to your github.

If you have other ideas - i can test it.

GilDev commented 3 years ago

It seems my RGBW lights have the same problem (cannot turn on) with or without your modification…

AythamiEsp commented 3 years ago

got the same problem here, still got firmware V2. Can't seem to get an update. Any tips?

thomasdg commented 3 years ago

Same here, it works to make my white only LED strip with v2.53.7173 work, but then the other controllers with v2.8.6457 stop working. Uninstalling the custom component enables the others again.

Been thinking: would it be an option to make this not replace the flux_led but really work as an independent platform, flux_led_fix or something like that? Then you could have 2 entries in the configuration.yaml, one for every type of controller. Or would HA not like it that way?

CorneliousJD commented 3 years ago

Been thinking: would it be an option to make this not replace the flux_led but really work as an independent platform, flux_led_fix or something like that? Then you could have 2 entries in the configuration.yaml, one for every type of controller. Or would HA not like it that way?

This could be a possibility, it should be easy enough to edit the files to load as separate addin - you can try it and test, I don't have any other LED strips other than the one and this fix worked for me so I wouldn't be modifying it myself, but you can fork the repo and give it a shot, it shouldn't be too hard to try and test! :)

If you have success feel free to report back here so others can find it in the future perhaps.

Thanks!