I wanted my hydrometer to stick to my pc case so i modelt this and it works great.
I used 4mm x 2mm magnets and some superglue.
(if there is any intresst in v.2 i would do it)