mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Make light.yeelight stop doing IO when accessing properties (#17917)
This commit is contained in:
parent
e5c97fdcab
commit
851d7e22e7
@ -276,7 +276,9 @@ class YeelightLight(Light):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def _properties(self) -> dict:
|
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
|
# F821: https://github.com/PyCQA/pyflakes/issues/373
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user