mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Tuya light icon fix (#17605)
* Fix for tuya light icons going too bright * Make sure other values aren't strings either
This commit is contained in:
parent
88ec73ed8f
commit
90183bd682
@ -40,17 +40,17 @@ class TuyaLight(TuyaDevice, Light):
|
|||||||
@property
|
@property
|
||||||
def brightness(self):
|
def brightness(self):
|
||||||
"""Return the brightness of the light."""
|
"""Return the brightness of the light."""
|
||||||
return self.tuya.brightness()
|
return int(self.tuya.brightness())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hs_color(self):
|
def hs_color(self):
|
||||||
"""Return the hs_color of the light."""
|
"""Return the hs_color of the light."""
|
||||||
return self.tuya.hs_color()
|
return tuple(map(int, self.tuya.hs_color()))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def color_temp(self):
|
def color_temp(self):
|
||||||
"""Return the color_temp of the light."""
|
"""Return the color_temp of the light."""
|
||||||
color_temp = self.tuya.color_temp()
|
color_temp = int(self.tuya.color_temp())
|
||||||
if color_temp is None:
|
if color_temp is None:
|
||||||
return None
|
return None
|
||||||
return colorutil.color_temperature_kelvin_to_mired(color_temp)
|
return colorutil.color_temperature_kelvin_to_mired(color_temp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user