-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdoorbell_notification.yaml
More file actions
106 lines (100 loc) · 3 KB
/
Copy pathdoorbell_notification.yaml
File metadata and controls
106 lines (100 loc) · 3 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
blueprint:
name: BTicino Doorbell Notification with Snapshot
description: >-
Sends a mobile notification with a snapshot image when someone rings the
doorbell. Includes action buttons to open the door or dismiss.
domain: automation
source_url: https://github.com/k-the-hidden-hero/bticino_intercom/blob/main/blueprints/automation/doorbell_notification.yaml
input:
call_sensor:
name: Doorbell Call Sensor
description: The binary sensor that turns on when the doorbell rings.
selector:
entity:
filter:
- domain: binary_sensor
integration: bticino_intercom
door_lock:
name: Door Lock
description: The lock entity to open when the user taps "Open Door".
selector:
entity:
filter:
- domain: lock
integration: bticino_intercom
snapshot_camera:
name: Snapshot Camera
description: The camera entity that provides the doorbell snapshot.
selector:
entity:
filter:
- domain: camera
integration: bticino_intercom
notify_device:
name: Mobile Device
description: The mobile device to send the notification to.
selector:
device:
filter:
- integration: mobile_app
notification_title:
name: Notification Title
description: Title of the notification.
default: "Doorbell"
notification_message:
name: Notification Message
description: Message body of the notification.
default: "Someone is at the door"
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: !input call_sensor
to: "on"
action:
- alias: "Send notification with snapshot and action buttons"
domain: mobile_app
type: notify
device_id: !input notify_device
title: !input notification_title
message: !input notification_message
data:
image: /api/camera_proxy/{{ camera_entity }}
actions:
- action: OPEN_DOOR
title: "Open Door"
- action: DISMISS
title: "Dismiss"
tag: bticino_doorbell
ttl: 0
priority: high
- alias: "Wait for user action or timeout"
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: OPEN_DOOR
- platform: event
event_type: mobile_app_notification_action
event_data:
action: DISMISS
- platform: state
entity_id: !input call_sensor
to: "off"
timeout:
seconds: 30
continue_on_timeout: true
- alias: "Open the door if requested"
if:
- condition: template
value_template: >-
{{ wait.trigger is not none and
wait.trigger.platform == 'event' and
wait.trigger.event.data.action == 'OPEN_DOOR' }}
then:
- alias: "Unlock the door"
service: lock.unlock
target:
entity_id: !input door_lock
variables:
camera_entity: !input snapshot_camera