Skip to content

Commit

Permalink
Merge 942acef into 88669c6
Browse files Browse the repository at this point in the history
  • Loading branch information
Oro committed Mar 19, 2019
2 parents 88669c6 + 942acef commit 3417e38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/nanoleaf/light.py
Expand Up @@ -195,6 +195,7 @@ def turn_off(self, **kwargs):

def update(self):
"""Fetch new state data for this light."""
from pynanoleaf import Unavailable
try:
self._available = self._light.available
self._brightness = self._light.brightness
Expand All @@ -203,7 +204,7 @@ def update(self):
self._effects_list = self._light.effects
self._hs_color = self._light.hue, self._light.saturation
self._state = self._light.on
except Exception as err: # pylint:disable=broad-except
except Unavailable as err:
_LOGGER.error("Could not update status for %s (%s)",
self.name, err)
self._available = False

0 comments on commit 3417e38

Please sign in to comment.