Probably done many times before but it’s the first time I’ve done something like this.
I’ve got a bunch of Xiaomi door sensors. I saw a youtube video where someone had soldered two points of the sensor to a water sensor matt. I thought why not do it to some battery springs and stick it in my door…and…IT WORKED!
All the bits:
This is the inside of the Xiaomi sensor, you can see the two points I soldered some cables onto:
I then took apart some spare battery holders I had laying around and connected them up:
Cut some little holes for the cables to be routed.
I now have a lock / bolt sensor in my door. Open state is “unlocked” closed state is “locked” just messed around with customize.yaml and all done.
binary_sensor.door_window_sensor_12345678910: friendly_name: "Front Door Lock" device_class: lock
edit: The spring part is put in the frame and then when the bolt is thrown it completes the circuit and puts the sensor in “locked” mode.