I have a small solenoid motor lock in my drawer that works really well. When it is given power (via a Sonoff 4CH R3) for 2 seconds it unlocks then locks again, enough time to open the drawer. I have a door sensor in the drawer which tells me if the drawer is open or closed.
I would like to create a lock template that actually shows the status of the drawer lock based on the status of the binary door sensor not if there is power going to the solenoid as this is only powered for 2 secs so as not to burn the small 24v motor.