I have an automatic door lock but no door sensor so I made this app to save me a little money. It’s pretty simple and this was the first thing I was hoping to set up when I bought an ST. It can turn on switches when a door is unlocked and turn off switches when a door is locked.
https://github.com/skp19/st_turn_on_when_door_unlocks
UPDATE:
- Added ability to change modes.
- Changed switches to not be required.
- Added option to only run between a certain time.