-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathlabeled.yaml
More file actions
120 lines (120 loc) · 3.07 KB
/
labeled.yaml
File metadata and controls
120 lines (120 loc) · 3.07 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
blueprint:
name: Sleep as Android MQTT actions
description: Define actions based on Sleep As Android sensor states
domain: automation
source_url: https://github.com/IATkachenko/HA-SleepAsAndroid/blob/main/blueprint/labeled.yaml
input:
device:
name: SleepAsAndroid device
description: 'Device for Sleep as Android '
selector:
device:
integration: sleep_as_android_mqtt
person:
name: Person
description: Person for checking state
selector:
entity:
domain: person
state:
name: State
description: Person must be in this state
default: home
sensor:
name: Sensor
description: Sensor for getting label attribute
selector:
entity:
integration: sleep_as_android_mqtt
domain: sensor
label:
name: Label
description: Sensor must have this label attribute
alarm_snooze_clicked:
name: alarm_snooze_clicked
description: alarm_snooze_clicked event
default: []
selector:
action: {}
alarm_snooze_canceled:
name: alarm_snooze_canceled
description: alarm_snooze_canceled event
default: []
selector:
action: {}
alarm_alert_start:
name: alarm_alert_start
description: alarm_alert_start event
default: []
selector:
action: {}
alarm_alert_dismiss:
name: alarm_alert_dismiss
description: alarm_alert_dismiss event
default: []
selector:
action: {}
alarm_skip_next:
name: alarm_skip_next
description: alarm_skip_next event
default: []
selector:
action: {}
mode: queued
max_exceeded: silent
trigger:
- platform: device
domain: sleep_as_android_mqtt
device_id: !input 'device'
type: alarm_snooze_clicked
id: alarm_snooze_clicked
- platform: device
domain: sleep_as_android_mqtt
device_id: !input 'device'
type: alarm_snooze_canceled
id: alarm_snooze_canceled
- platform: device
domain: sleep_as_android_mqtt
device_id: !input 'device'
type: alarm_alert_start
id: alarm_alert_start
- platform: device
domain: sleep_as_android_mqtt
device_id: !input 'device'
type: alarm_alert_dismiss
id: alarm_alert_dismiss
- platform: device
domain: sleep_as_android_mqtt
device_id: !input 'device'
type: alarm_skip_next
id: alarm_skip_next
condition:
- condition: state
entity_id: !input person
state: !input state
- condition: state
entity_id: !input sensor
attribute: label
state: !input label
action:
- choose:
- conditions:
condition: trigger
id: alarm_snooze_clicked
sequence: !input 'alarm_snooze_clicked'
- conditions:
condition: trigger
id: alarm_snooze_canceled
sequence: !input 'alarm_snooze_canceled'
- conditions:
condition: trigger
id: alarm_alert_start
sequence: !input 'alarm_alert_start'
- conditions:
condition: trigger
id: alarm_alert_dismiss
sequence: !input 'alarm_alert_dismiss'
- conditions:
condition: trigger
id: alarm_skip_next
sequence: !input 'alarm_skip_next'