handling lights being in color mode
This commit is contained in:
@@ -182,9 +182,13 @@ class ControllerDaylight(ControllerEntities):
|
||||
def matching_state(self, entity_id: str):
|
||||
state = self.get_state(entity_id=entity_id, attribute='all')['attributes']
|
||||
settings = self.adjuster.current_settings
|
||||
state = {s: state[s] for s in settings.keys()}
|
||||
valid = all((state[s] == val) for s, val in settings.items())
|
||||
return valid
|
||||
try:
|
||||
state = {s: state[s] for s in settings.keys()}
|
||||
except KeyError:
|
||||
return False
|
||||
else:
|
||||
valid = all((state[s] == val) for s, val in settings.items())
|
||||
return valid
|
||||
|
||||
def ongoing_adjustment(self, kwargs):
|
||||
settings = self.adjuster.current_settings
|
||||
|
||||
Reference in New Issue
Block a user