mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
ignore unreachable state if opted in
This commit is contained in:
parent
dd33831cb1
commit
95d5c456d7
@ -213,7 +213,11 @@ class HueLight(Light):
|
||||
def is_on(self):
|
||||
"""Return true if device is on."""
|
||||
self.update_lights()
|
||||
return self.info['state']['reachable'] and self.info['state']['on']
|
||||
|
||||
if self.allow_unreachable:
|
||||
return self.info['state']['on']
|
||||
else:
|
||||
return self.info['state']['reachable'] and self.info['state']['on']
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the specified or all lights on."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user