Skip to content

Commit

Permalink
Fix candela TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoohb committed Sep 25, 2020
1 parent 3679796 commit b7623fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/yeelight_bt/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _status_cb(self):

self._brightness = int(round(255.0 * self._dev.brightness / 100))
self._is_on = self._dev.is_on
if self._dev.mode == self._dev.MODE_WHITE:
if self._dev.mode == self._dev.MODE_WHITE and self._dev.temperature is not None:
temp_in_k = int(self.scale_temp_reversed(self._dev.temperature))
self._ct = int(kelvin_to_mired(temp_in_k))
self._rgb = (0, 0, 0)
Expand Down

0 comments on commit b7623fc

Please sign in to comment.