I recently got into the home automation thing with ST and im enjoying it.
I looked around for a while and didn’t find much information on this (as basically no products) so figured I would share what I did in case it is helpful to others.
Long story short I love the ST idea / concept but I cant stand battery powered devices, im lazy and I want things to work reliably and constantly without any input.
So see the below imgur link for lots of photos for wiring up a few types of sensors for mains power.
Its frightfully easy, all you need is :
Soldering Iron & Solder
Buck converters (any should suffice, ebay, Amazon, currant draw on these things is negligible)
Terminal Blocks (ebay)
12v Power Supplies (Buy Meanwell PSU`s, they are highly regarded and I dont risk random Chinese stuff in the house)
Short version :
Mains > 12V Power Supply > 12v Out > Buck Converter > 3v Out > Sensor
Try any of this at your own risk, im not responsible for you or your hardware, if in doubt get a professional in, especially where mains voltage & wiring is concerned.