home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.16k stars 29.83k forks source link

LimitlessLED not able to switch to warm white / cold white while an RGB color is active #8587

Closed PheiPheiPhei closed 6 years ago

PheiPheiPhei commented 7 years ago

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.49.0

Python release (python3 --version): Python 3.4.2

Component/platform: limitlessled

Description of problem: When trying to switch from any color back to cold white/warm white, nothing happens, whether by dragging the color temperature slider or calling light.turn_on with color_temp/kelvin parameter. The bulb has to first be switched back to "white mode" by setting an RGB white.

Expected: The bulb should switch to white mode automatically when it is currently in RGB color mode.

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

light:
  - platform: limitlessled
    bridges:
      - host: 10.47.173.144
        groups:
        - number: 1
          type: rgbww
          name: Decke
        - number: 2
          type: rgbww
          name: Couch
        - number: 3
          type: rgbww
          name: Schreibtisch
        - number: 4
          type: rgbww
          name: Tisch
        - number: 1
  1. Set bulb to any RGB color
  2. Try to switch to a warm white/cold white

Traceback (if applicable):


Jul 21 12:03:44 hassbian hass[738]: 2017-07-21 12:03:44 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, domain=light, service_data=entity_id=light.schreibtisch, color_temp=252, service_call_id=1977592784-243>
Jul 21 12:03:44 hassbian hass[738]: 2017-07-21 12:03:44 INFO (Thread-19) [limitlessled.pipeline] Starting a new pipeline on group 3 (Schreibtisch) @ 10.47.173.144
Jul 21 12:03:44 hassbian hass[738]: 2017-07-21 12:03:44 INFO (Thread-19) [limitlessled.pipeline]  -> Running stage 'transition(0, color=Color(R=255, G=2, B=157), brightness=1.0)' on group 3 (Schreibtisch) @ 10.47.173.144
Jul 21 12:03:44 hassbian hass[738]: 2017-07-21 12:03:44 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state light.schreibtisch=on; rgb_color=(255, 2, 157), min_mireds=154, color_temp=252, friendly_name=Schreibtisch, max_mireds=500, brightness=255, supported_features=63 @ 2017-07-21T14:02:41.436799+02:00>, entity_id=light.schreibtisch, old_state=<state light.schreibtisch=on; rgb_color=(255, 2, 157), min_mireds=154, color_temp=359, friendly_name=Schreibtisch, max_mireds=500, brightness=255, supported_features=63 @ 2017-07-21T14:02:41.436799+02:00>>
Jul 21 12:03:44 hassbian hass[738]: 2017-07-21 12:03:44 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1977592784-243>
Jul 21 12:03:45 hassbian hass[738]: 2017-07-21 12:03:45 INFO (Thread-19) [limitlessled.pipeline] Finished pipeline on group 3 (Schreibtisch) @ 10.47.173.144
Jul 21 12:03:49 hassbian hass[738]: 2017-07-21 12:03:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, domain=light, service_data=entity_id=light.schreibtisch, color_temp=382, service_call_id=1977592784-244>
Jul 21 12:03:49 hassbian hass[738]: 2017-07-21 12:03:49 INFO (Thread-19) [limitlessled.pipeline] Starting a new pipeline on group 3 (Schreibtisch) @ 10.47.173.144
Jul 21 12:03:49 hassbian hass[738]: 2017-07-21 12:03:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state light.schreibtisch=on; rgb_color=(255, 2, 157), min_mireds=154, color_temp=382, friendly_name=Schreibtisch, max_mireds=500, brightness=255, supported_features=63 @ 2017-07-21T14:02:41.436799+02:00>, entity_id=light.schreibtisch, old_state=<state light.schreibtisch=on; rgb_color=(255, 2, 157), min_mireds=154, color_temp=252, friendly_name=Schreibtisch, max_mireds=500, brightness=255, supported_features=63 @ 2017-07-21T14:02:41.436799+02:00>>
Jul 21 12:03:49 hassbian hass[738]: 2017-07-21 12:03:49 INFO (Thread-19) [limitlessled.pipeline]  -> Running stage 'transition(0, color=Color(R=255, G=2, B=157), brightness=1.0)' on group 3 (Schreibtisch) @ 10.47.173.144
Jul 21 12:03:49 hassbian hass[738]: 2017-07-21 12:03:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1977592784-244>
Jul 21 12:03:50 hassbian hass[738]: 2017-07-21 12:03:50 INFO (Thread-19) [limitlessled.pipeline] Finished pipeline on group 3 (Schreibtisch) @ 10.47.173.144

Additional info:

andrei-radulescu commented 7 years ago

I opened without realizing a duplicate: https://github.com/home-assistant/home-assistant/issues/9107. There is some extra information to be found.

andrei-radulescu commented 7 years ago

@PheiPheiPhei

One quick fix that i found it's to insert in ˜/homeassistant/components/light/limitlessled.py after line 350 the following: self._color = WHITE (check the indent to be the same as line 350). This has the following effect: As soon as you set the color_temp to a valid value, the color will default to white:

light.living_room_table_light:
  state: on
  brightness: 255
  #color_name: white -> not needed anymore / has to be removed
  color_temp: 154

@happyleavesaoc - FYI

happyleavesaoc commented 7 years ago

I don't have an rgbww bulb to test this fix with. I could see if it has adverse effects on the v5 bridge though.

andrei-radulescu commented 7 years ago

this should only affect rgbww - but the transition is not smooth when changing from a RGB color like before 0.49. There where some fundamental changes in that release that don't agree much with v6 - especially with transitions.

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

andrei-radulescu commented 6 years ago

@balloob Nope :) a new release won't fix this. A suggestion for the fix can be found in the upper comment.