Skip to content

Commit

Permalink
set group state "any_on" to True when scene activated for correct rul…
Browse files Browse the repository at this point in the history
…es processing
  • Loading branch information
mariusmotea committed Aug 31, 2024
1 parent de2b5bc commit 52ad547
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BridgeEmulator/HueObjects/Scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def activate(self, data):
for device, state in queueState.items():
state["object"].setV1State(state)

if self.type == "GroupScene":
self.group().state["any_on"] = True

def getV1Api(self):
result = {}
result["name"] = self.name
Expand Down
2 changes: 2 additions & 0 deletions BridgeEmulator/HueObjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def setGroupAction(group, state, scene=None):
sceneStates = list(scene.lightstates.items())
for light, state in sceneStates:
lightsState[light.id_v1] = state
if "on" in state and state["on"] == True:
group.state["any_on"] = True

else:
state = incProcess(group.action, state)
Expand Down

0 comments on commit 52ad547

Please sign in to comment.