If those are all 3VDC batteries, then you can get 3VDC power supplies and solder the +ve and -ve terminals from the power supply to the appropriate terminals where the batteries would connect.
You’ll probably have to drill a hole in the case. Here’s an old example of one of my Hue motion sensors: