Skip to content

Commit a1b7bce

Browse files
committed
Added client-wide state hash
1 parent d4d1746 commit a1b7bce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

openrgb/orgb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ def _callback(self, device: int, type: int, data: Any):
411411
self.devices[device] = Device(data, device, self.comms)
412412
else:
413413
self.devices[device]._update(data) # type: ignore
414+
self.state_hash = hash("".join(str(dev.state_hash) for dev in self.devices if dev))
414415
except IndexError:
415416
self.comms.requestDeviceNum()
416417
elif type == utils.PacketType.DEVICE_LIST_UPDATED:
@@ -643,3 +644,4 @@ def ee_devices(self):
643644
control mode. These devices are suitable to use with an effects engine.
644645
'''
645646
return [dev for dev in self.devices for mode in dev.modes if mode.name.lower() == 'direct']
647+

0 commit comments

Comments
 (0)