mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Removed overly broad exception handling for nanoleaf light (#22189)
This commit is contained in:
parent
423d595edf
commit
ab17b22239
@ -195,6 +195,7 @@ class NanoleafLight(Light):
|
||||
|
||||
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
|
||||
@ -203,7 +204,7 @@ class NanoleafLight(Light):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user