Core: Flux led/Magic home brightness adjust turns blanks light

Created on 8 Nov 2016  路  11Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.32.2

Python release (python3 --version):
Docker version

Component/platform:
Flux led/Magic Home

Description of problem:
When I adjust the brightness slider for my Magic Home RGB led controller the lights all blank out. The same behavior happens when running flux_led.py and setting the white value when this is an RGB controller.
$ ./flux_led.py IP -w 50

Changing the color in HA or setting a valid color value with flux_led.py brings the lights back.

Controller link:
https://www.amazon.com/SUPERNIGHT-Wireless-Controller-Working-Android/dp/B01JZ2SI6Q/ref=sr_1_49?ie=UTF8&qid=1478559479&sr=8-49-spons&keywords=mini+led+controller+wifi+ir&psc=1

Expected:
The brightness slider to lower the light by lowering all RGB values together. If not able to adjust all values then slider should be removed when dealing with RGB.

Problem-relevant configuration.yaml entries and steps to reproduce:

- platform: flux_led
  devices:
    IP:
      name: bed
  1. Click light in interface and adjust brightness slider.
  2. Notice lights turned off
  3. Click a color in the palette to bring lights back

Traceback (if applicable):


Additional info:
Here's the code that effects adjustment from the flux_led.py component. It's lines 132-135.

if rgb:
self._bulb.setRgb(*tuple(rgb))
elif brightness:
self._bulb.setWarmWhite255(brightness)
problem in dependency

Most helpful comment

I have made a quick fix here: https://github.com/home-assistant/home-assistant/compare/flux_led?expand=1
I do not have any rgb bulbs, so the code is untested. Enable the new code by:

    192.168.1.10:
      name: NAME
      mode: "rgb"

All 11 comments

Having thought about this over night, a slider for each color would be nice. I'm not exactly sure how the mapping between a single slider and the 3 color values would work unless full brightness was 255 for all colors and no brightness was 0 for all colors. There would have to be some sort of mapping when the color values start off at different values.

@mehuman which flux_led version are you using? Can you check if you have this patch applied?
https://github.com/Danielhiversen/flux_led/commit/e6e11ac017e933b3486283967e9f5ab7546762c1

I'll double check when I'm home but I just did a recent pull of the docker file and according to the requirements_all.txt it should be version 0.8.

# homeassistant.components.light.flux_led
https://github.com/Danielhiversen/flux_led/archive/0.8.zip#flux_led==0.8

I have made a quick fix here: https://github.com/home-assistant/home-assistant/compare/flux_led?expand=1
I do not have any rgb bulbs, so the code is untested. Enable the new code by:

    192.168.1.10:
      name: NAME
      mode: "rgb"

Thanks! I'll try to test the fix tonight and report back.

I'm getting this error and below is my config. I used wget the updated file and confirmed it has mode defined. Perhaps there is something I'm missing?

# grep mode flux_led.py
ATTR_MODE = 'mode'
        self._mode = device[ATTR_MODE]
            if self._mode == 'rgbw':
            elif self._mode == 'rgb':

16-11-08 18:38:17 homeassistant.bootstrap: Invalid config for [light.flux_led]: [mode] is an invalid option for [light.flux_led]. Check: light.flux_led->devices->10.0.0.213->mode. (See ?:?). Please check the docs at https://home-assistant.io/components/light.flux_led/

- platform: flux_led
  devices:
    10.0.0.213:
      name: bed
      mode: "rgb"

My mistake.
I think I have fixed it now.

The last change worked, everything as expected. Thanks for the quick fix!

Great.
I will add it to the dev branch, so will it probably be part of the next release

@Danielhiversen No. Everything is working as expected for me. I've seen no slider jumping but my unit is only RGB and not RGBW. My controller is also v3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aguilaair picture aguilaair  路  162Comments

Gio76 picture Gio76  路  223Comments

Bergasha picture Bergasha  路  176Comments

sagilo picture sagilo  路  130Comments

ariel-madril picture ariel-madril  路  451Comments