Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (32 sloc) 884 Bytes
binary_sensor:
- platform: mqtt
state_topic: "pat/alarm/Back Door"
name: "Back Door"
payload_on: "open"
payload_off: "closed"
device_class: opening
- platform: mqtt
state_topic: "pat/alarm/Front Door"
name: "Front Door"
payload_on: "open"
payload_off: "closed"
device_class: opening
- platform: mqtt
state_topic: "pat/alarm/Garage Entry"
name: "Garage Entry"
payload_on: "open"
payload_off: "closed"
device_class: opening
automation:
# Alert us if a door is left open
- alias: "Door Open"
trigger:
- platform: state
entity_id: binary_sensor.garage_entry, binary_sensor.front_door
to: "on"
for:
minutes: 5
action:
- service: notify.phones
data_template:
message: "{{ trigger.to_state.attributes.friendly_name }} has been open for 5 minutes."