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):
|
def matching_state(self, entity_id: str):
|
||||||
state = self.get_state(entity_id=entity_id, attribute='all')['attributes']
|
state = self.get_state(entity_id=entity_id, attribute='all')['attributes']
|
||||||
settings = self.adjuster.current_settings
|
settings = self.adjuster.current_settings
|
||||||
state = {s: state[s] for s in settings.keys()}
|
try:
|
||||||
valid = all((state[s] == val) for s, val in settings.items())
|
state = {s: state[s] for s in settings.keys()}
|
||||||
return valid
|
except KeyError:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
valid = all((state[s] == val) for s, val in settings.items())
|
||||||
|
return valid
|
||||||
|
|
||||||
def ongoing_adjustment(self, kwargs):
|
def ongoing_adjustment(self, kwargs):
|
||||||
settings = self.adjuster.current_settings
|
settings = self.adjuster.current_settings
|
||||||
|
|||||||
Reference in New Issue
Block a user