When tradfri experience communication errors make the lights/devices unavailable. (#19288)
This commit is contained in:
1 parent
e2f55a959f
commit
b3a08d5876
2 files changed
+4
No files matched your search
@@ -108,6 +108,8 @@ class TradfriSwitch(SwitchDevice):
|
||||
"""Start observation of switch."""
|
||||
from pytradfri.error import PytradfriError
|
||||
if exc:
|
||||
self._available = False
|
||||
self.async_schedule_update_ha_state()
|
||||
_LOGGER.warning("Observation failed for %s", self._name,
|
||||
exc_info=exc)
|
||||
|
||||
|
||||
Reference in new issue
Block a user