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.57k stars 29.91k forks source link

webinterface: temperature slider vor limitless led v6 has the background indicator for cold/warm the other way around #7333

Closed andrei-radulescu closed 7 years ago

andrei-radulescu 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.43.1

Python release (python3 --version): Python 3.4.2

Component/platform: limitlessled

Description of problem: in the webinterface the temperature slider has the background image the other way around for warm and cold

-> maybe an easy fix

amelchio commented 7 years ago

I do not have this hardware, but let's see if I can help anyway :-)

It might well be the background image that is correct. Can you try light.turn_on with color_temp set to 200 (bright white) and then 400 (yellowish) and see if you get the expected result?

tbrasser commented 7 years ago

When I use the flux light adjustment component with my milights (v6 bridge) all the color is reversed as well. So it's probably not a cosmetic thing, but is reversed inside the light component.

amelchio commented 7 years ago

Right. So fixing this means that any existing color_temp configuration will have to be changed around.

andrei-radulescu commented 7 years ago

alright, the flux component i didn't test. But like I said regarding scenes and scripts - colo_temp 148 resolves to warm light (yellowish) and 500 to strong cold light. For me this was the way I used limitlessled before 43.0. Or perhaps I have been using this in a wrong way :)

On 28. Apr 2017, at 11:24, Anders Melchiorsen notifications@github.com wrote:

Right. So fixing this means that any existing color_temp configuration will have to be changed around.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tbrasser commented 7 years ago

@amelchio Right now LimitLessLed/MiLight color_temp seems to be implemented the wrong way around in comparison to Philips Hue (and probably all other lights capable of color temperatures).

amelchio commented 7 years ago

Can you try testing my possible fix in #7359?

amelchio commented 7 years ago

@Andrei-Radulescu @tbrasser Are you able to help test this? I am not going to include it without confirmation that it fixes the problem.

andrei-radulescu commented 7 years ago

of course, i wasn't available for the last days but i'll test the fix after work

andrei-radulescu commented 7 years ago

The slider shows the temperature correctly. But there is an exception rendering the component usless:

Exception in thread Thread-18: Traceback (most recent call last): File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run() File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/limitlessled/pipeline.py", line 32, in run self._queue.get().run(self._event) File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/limitlessled/pipeline.py", line 109, in run self._execute_stage(i, stage, stop) File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/limitlessled/pipeline.py", line 167, in _execute_stage self._group.transition(*stage.args, **stage.kwargs) File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/limitlessled/group/rgbww.py", line 182, in transition self.temperature = temperature File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/limitlessled/group/rgbww.py", line 148, in temperature raise ValueError("Temperature must be a percentage " ValueError: Temperature must be a percentage represented as decimal 0-1.0

amelchio commented 7 years ago

Good thing we tested 😃.

How do you get this exception and does it happen all the time?

andrei-radulescu commented 7 years ago

as soon the temperature slider is moved. I think the conversion to the percentage doesn't work anymore

amelchio commented 7 years ago

I checked this many times now, I don't see a problem. Sorry to suggest this but are you sure you didn't make a typo when making the modifications?

andrei-radulescu commented 7 years ago

You are right. Sorry, I didn't do the diff properly. Missed to remove + 154. It works now as expected