Tuya light icon fix (#17605)

* Fix for tuya light icons going too bright

* Make sure other values aren't strings either
pull/17613/head
Thomas Lovén 2018-10-19 09:17:19 +02:00 committed by Paulus Schoutsen
parent 88ec73ed8f
commit 90183bd682
1 changed files with 3 additions and 3 deletions

View File

@ -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)