diff --git a/openrgb/orgb.py b/openrgb/orgb.py index 523e650..f6206b1 100644 --- a/openrgb/orgb.py +++ b/openrgb/orgb.py @@ -200,6 +200,7 @@ def _update(self, data: utils.ControllerData): self._colors = self.colors[:] self.active_mode = data.active_mode self.data = data + self.state_hash = hash(str(data)) def _set_device_color(self, color: utils.RGBColor, fast: bool = False): ''' @@ -410,6 +411,7 @@ def _callback(self, device: int, type: int, data: Any): self.devices[device] = Device(data, device, self.comms) else: self.devices[device]._update(data) # type: ignore + self.state_hash = hash("".join(str(dev.state_hash) for dev in self.devices if dev)) except IndexError: self.comms.requestDeviceNum() elif type == utils.PacketType.DEVICE_LIST_UPDATED: