Fix brightness type (#25818)

This commit is contained in:
Andrew Sayre authored and Paulus Schoutsen committed 2019-08-09 11:41:50 -07:00
1 parent 5b516fc0cd
commit 6909235d8a
2 files changed
+7 -3

No files matched your search

@@ -133,7 +133,9 @@ class SmartThingsLight(SmartThingsEntity, Light):
"""Update entity attributes when the device status has changed."""
# Brightness and transition
if self._supported_features & SUPPORT_BRIGHTNESS:
self._brightness = convert_scale(self._device.status.level, 100, 255)
self._brightness = int(
convert_scale(self._device.status.level, 100, 255, 0)
)
# Color Temperature
if self._supported_features & SUPPORT_COLOR_TEMP:
self._color_temp = color_util.color_temperature_kelvin_to_mired(