Tuya light icon fix (#17605)
* Fix for tuya light icons going too bright * Make sure other values aren't strings eitherpull/17613/head
parent
88ec73ed8f
commit
90183bd682
|
@ -40,17 +40,17 @@ class TuyaLight(TuyaDevice, Light):
|
|||
@property
|
||||
def brightness(self):
|
||||
"""Return the brightness of the light."""
|
||||
return self.tuya.brightness()
|
||||
return int(self.tuya.brightness())
|
||||
|
||||
@property
|
||||
def hs_color(self):
|
||||
"""Return the hs_color of the light."""
|
||||
return self.tuya.hs_color()
|
||||
return tuple(map(int, self.tuya.hs_color()))
|
||||
|
||||
@property
|
||||
def color_temp(self):
|
||||
"""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:
|
||||
return None
|
||||
return colorutil.color_temperature_kelvin_to_mired(color_temp)
|
||||
|
|
Loading…
Reference in New Issue