Closed ctalkington closed 6 years ago
Hmm, LB100 does not support temperature changing, so the backend library reports 0 as min & max kelvin. The fix would be to check for that and return whatever is the default return for those methods.
Probably return None
for min_mireds
with that bulb?
This was the fix for me. Edit color.py
From:
def color_temperature_kelvin_to_mired(kelvin_temperature):
"""Convert degrees kelvin to mired shift."""
return math.floor(1000000 / kelvin_temperature)
To:
def color_temperature_kelvin_to_mired(kelvin_temperature):
"""Convert degrees kelvin to mired shift."""
if kelvin_temperature != None and kelvin_temperature != 0:
return math.floor(1000000 / kelvin_temperature)
Same problem here - LB110 doesn't have colour control, so now they are broken in the GUI. Still seem to work in automations, but it would be good to see this fixed. Is there an ETA?
I am using hassio, so hard to fix the source.
I'm wondering if the get_features()
should already be called in setup_platform()
? That way min_mireds
and max_mireds
should never be accessed and this issue would be solved without other changes. Anyone mind testing if that'd do the trick?
Its interesting to see this issue reappear. It used to occur way back in the early days of the tplink platform. Strange to see it resurface now. Was working fine for me until 0.73.1. For now I'll go back to altering color.py as I did in the old (lol maybe a year ago) days.
I had the same issue and the implemented something similar as comment 6 https://github.com/home-assistant/home-assistant/issues/15339#issuecomment-405041884
If you are going for a local change, please test #15484 since that is what we expect will fix this issue.
seems resolved in 0.74.0
It seems that @rytilahti managed to fix it with #15571 👍
Home Assistant release with the issue:
0.73.0
Last working Home Assistant release (if known): 0.72.1
Operating environment (Hass.io/Docker/Windows/etc.):
Docker / RPI3B
Component/platform:
light.tplink
Description of problem: LB100 causes division by zero error with kelvin temperature conversion. seems #15020 could be the culprit
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information: