A month ago I wrote this but never got around to documenting it. I had a situation where I left the house after having some utility guys over and forgot that I left the side door wide open. I figured that I needed to write up a quick automation to prevent that from ever happening again so I wrote this quick automation.
# Idiot Alert - If doors are open and I leave, remind me
- alias: 'Door Minder'
trigger:
platform: state
entity_id: device_tracker.rpitera_rpitera
from: 'home'
to: 'not_home'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.front_door
state: 'on'
- condition: state
entity_id: binary_sensor.side_door
state: 'on'
action:
service: notify.pushbullet
data_template:
message: >
Robert, you left one of the entry doors open. Front Door is {{ states.binary_sensor.front_door.state }}. Side Door is {{ states.binary_sensor.side_door.state }}.
I’m using Owntracks for my device tracker and tested this out and it triggers while I am only a few blocks from home. Works great and the notification tells me which door is open. Not a big deal, but I thought I’d share it to save someone the trouble.