-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
118 lines (105 loc) · 3.31 KB
/
automations.yaml
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
- alias: 'canc open'
trigger:
- platform: state
entity_id: binary_sensor.canc_censor
to: 'on'
for:
seconds: 1
action:
service: notify.s7
data:
{"message":"Cancello aperto!","title":"Home Assistant","data":{"icon":"https://goo.gl/xeetdy", "vibration":"125,75,125,275,200,275,125,75,125,275,200,600,200,600"}}
- alias: 'corinne casa'
trigger:
- platform: zone
entity_id: device_tracker.corinne_corinne
zone: zone.casa
event: enter
action:
service: notify.s7
data:
{"message":"Corinne è a casa!","title":"Home Assistant","data":{"icon":"https://goo.gl/xeetdy", "vibration":"500,110,500,110,450,110,200,110,170,40,450,110,200,110,170,40,500"}}
- alias: 'irrigazione'
initial_state: 'off'
trigger:
- platform: template
value_template: '{{ (states.input_datetime.irrigazione.attributes.timestamp | int | timestamp_custom("%H:%M", False)) == states.sensor.time.state }}'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
service: switch.turn_on
entity_id: switch.irrigazione
- alias: 'tempo irrigazione'
trigger:
- platform: state
entity_id: switch.irrigazione
to: 'on'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
service: script.turn_on
entity_id: script.tempo_irrig
- alias: 'Set Spotify Volume'
trigger:
- platform: state
entity_id: input_number.spotify_volume
action:
service: media_player.volume_set
data_template:
entity_id: media_player.spotify
volume_level: '{{ states.input_number.spotify_volume.state }}'
- alias: 'tts_canc'
trigger:
- platform: state
entity_id: binary_sensor.canc_censor
to: 'on'
action:
service: tts.google_say
entity_id: media_player.salotto
data:
message: 'il cancello è aperto'
- alias: 'face_rec'
initial_state: 'off'
trigger:
- platform: state
entity_id: image_processing.microsoftface_cam
to: 'unknown'
action:
service: tts.google_say
entity_id: media_player.salotto
data:
message: 'rilevato estraneo in casa, attivazione allarme'
- alias: 'alarm triggered'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'triggered'
action:
service: notify.s7
data:
{"message":"Allarme Intruso!","title":"Home Assistant","data":{"icon":"https://goo.gl/xeetdy", "vibration":"500,110,500,110,450,110,200,110,170,40,450,110,200,110,170,40,500"}}
- alias: 'alarm warning'
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'warning'
action:
service: notify.s7
data:
{"message":"Attenzione intruso!","title":"Home Assistant","data":{"icon":"https://goo.gl/xeetdy", "vibration":"500,110,500,110,450,110,200,110,170,40,450,110,200,110,170,40,500"}}