Make light.yeelight stop doing IO when accessing properties (#17917)

This commit is contained in:
Rohan Kapoor 2018-10-29 00:07:57 -07:00 committed by Paulus Schoutsen
parent e5c97fdcab
commit 851d7e22e7

View File

@ -276,7 +276,9 @@ class YeelightLight(Light):
@property
def _properties(self) -> dict:
return self._bulb.last_properties
if self._bulb_device is None:
return {}
return self._bulb_device.last_properties
# F821: https://github.com/PyCQA/pyflakes/issues/373
@property