mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 23:55:07 +02:00
ignore unreachable state if opted in
This commit is contained in:
@@ -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."""
|
||||
|
Reference in New Issue
Block a user