Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed overly broad exception handling for nanoleaf light #22189

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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