mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Unnecessary rounding and typo removed
This commit is contained in:
@@ -25,7 +25,7 @@ class AveaLight(Light):
|
|||||||
"""Representation of an Avea."""
|
"""Representation of an Avea."""
|
||||||
|
|
||||||
def __init__(self, light):
|
def __init__(self, light):
|
||||||
"""Initialize an AveaLigh."""
|
"""Initialize an AveaLight."""
|
||||||
self._light = light
|
self._light = light
|
||||||
self._name = light.get_name()
|
self._name = light.get_name()
|
||||||
if int(light.get_brightness()) == 0:
|
if int(light.get_brightness()) == 0:
|
||||||
@@ -72,7 +72,7 @@ class AveaLight(Light):
|
|||||||
self._light.set_brightness(bright)
|
self._light.set_brightness(bright)
|
||||||
if ATTR_HS_COLOR in kwargs:
|
if ATTR_HS_COLOR in kwargs:
|
||||||
rgb = color_util.color_hs_to_RGB(*kwargs[ATTR_HS_COLOR])
|
rgb = color_util.color_hs_to_RGB(*kwargs[ATTR_HS_COLOR])
|
||||||
self._light.set_rgb(round(255 * (rgb[0] / 100)), round(255 * (rgb[1] / 100)), round(255 * (rgb[2] / 100)))
|
self._light.set_rgb(rgb[0],rgb[1],rgb[2])
|
||||||
|
|
||||||
def turn_off(self, **kwargs):
|
def turn_off(self, **kwargs):
|
||||||
"""Instruct the light to turn off."""
|
"""Instruct the light to turn off."""
|
||||||
|
Reference in New Issue
Block a user