Convert a Battery-powered Sensor to Mains?

I’ve wired many of my devices. Here’s a link: