-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhone - Door open notification
35 lines (34 loc) · 1.08 KB
/
Phone - Door open notification
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Sends a notification to my phone I am not home, and a door is opened
# Ensure you have set your Home area on the map in HA
# You will need the HA app on your phone, with your phone added as a device to HA
alias: Door Opened Phone Notification
description: Notify phone when a door is opened
trigger:
- type: opened
platform: device
device_id: 4f3e900231166c773156a3dc946fd44f
entity_id: binary_sensor.front_door_contact
domain: binary_sensor
- type: opened
platform: device
device_id: 28f3423ecec8312e0ed2e8fbd5c5c0b5
entity_id: binary_sensor.garage_door_contact
domain: binary_sensor
condition:
- condition: not
conditions:
- condition: zone
entity_id: device_tracker.phone
zone: zone.home
action:
- service: notify.mobile_app_phone
data:
message: |
{% if trigger.entity_id == 'binary_sensor.front_door_contact' %}
Front Door opened
{% elif trigger.entity_id == 'binary_sensor.garage_door_contact' %}
Garage Door opened
{% else %}
Door opened
{% endif %}
mode: single