mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user