Skip to content

Commit

Permalink
add condition to average bri in groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriksen-mark committed Sep 25, 2024
1 parent 0646b2a commit 7a0bec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BridgeEmulator/HueObjects/Group.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def update_state(self):
else:
all_on = False
if any_on:
bri = (((bri/lights_on)/254)*100)
bri = (((bri/lights_on)/254)*100) if bri > 0 else 0
return {"all_on": all_on, "any_on": any_on, "avr_bri": int(bri)}

def setV2Action(self, state):
Expand Down

0 comments on commit 7a0bec2

Please sign in to comment.