Reverse limitlessled color_temp range (#7359)
Reverse limitlessled color_temp range
This commit is contained in:
parent
403a721e91
commit
dbd6f7e4ed
1 changed files with 2 additions and 2 deletions
|
@ -376,12 +376,12 @@ class LimitlessLEDRGBWWGroup(LimitlessLEDGroup):
|
|||
|
||||
def _from_hass_temperature(temperature):
|
||||
"""Convert Home Assistant color temperature units to percentage."""
|
||||
return (temperature - 154) / 346
|
||||
return 1 - (temperature - 154) / 346
|
||||
|
||||
|
||||
def _to_hass_temperature(temperature):
|
||||
"""Convert percentage to Home Assistant color temperature units."""
|
||||
return int(temperature * 346) + 154
|
||||
return 500 - int(temperature * 346)
|
||||
|
||||
|
||||
def _from_hass_brightness(brightness):
|
||||
|
|
Loading…
Add table
Reference in a new issue