Here is my version of hardwiring them. Since many of mine are plugged into outlets in the attic being able to remove the “battery” to reset it was useful to me.
I wanted to share this project with the community in case you have similar challenges. I do NOT however want to get into a debate on the cost of batteries vs the cost of converting sensors to batteries which has been debated several times on this community; I realize this is more expensive. But I value my personal time and this has and will save me there.
Several years ago when still using the ST platform, I explained how I converted a few sensors from batteries to USB power:
Make a battery …