Skip to content

Commit 809995e

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

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

openrgb/orgb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,3 +643,11 @@ def ee_devices(self):
643643
control mode. These devices are suitable to use with an effects engine.
644644
'''
645645
return [dev for dev in self.devices for mode in dev.modes if mode.name.lower() == 'direct']
646+
647+
@property
648+
def state_hash(self):
649+
'''
650+
A hash of the current state of all devices, for use in tracking
651+
changes. Note that python's hash function is not process-stable.
652+
'''
653+
return hash("".join(str(dev.state_hash) for dev in self.devices))

0 commit comments

Comments
 (0)