This is exactly what I did with my smartthings sensors
Used your idea and it works great.
I used the small hinge very similar to the one in the video and it works great. No need for a large hinge. Used a dab of silicone to ensure they don’t fall off.