How to add a magnetic sensor?

Hello Otso, Dgerman,
Thank you very much for your time and the advice.

I have just created this topic: