Permalink
Switch branches/tags
Nothing to show
Find file Copy path
f98f90e Feb 25, 2018
1 contributor

Users who have contributed to this file

34 lines (32 sloc) 909 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, binary_sensor.back_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."