mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 00:25:12 +02:00
ignore unreachable state if opted in
This commit is contained in:
@@ -213,6 +213,10 @@ class HueLight(Light):
|
|||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""Return true if device is on."""
|
"""Return true if device is on."""
|
||||||
self.update_lights()
|
self.update_lights()
|
||||||
|
|
||||||
|
if self.allow_unreachable:
|
||||||
|
return self.info['state']['on']
|
||||||
|
else:
|
||||||
return self.info['state']['reachable'] and self.info['state']['on']
|
return self.info['state']['reachable'] and self.info['state']['on']
|
||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
|
Reference in New Issue
Block a user