-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
68 lines (60 loc) · 2.28 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
##########################################
##########################################
# righe per automatizzare il salvataggio automatico su DropBox
- alias: backup automatico
initial_state: true
trigger:
platform: time
at: '3:00:00'
condition:
- condition: time
weekday:
- mon
action:
- service: hassio.snapshot_full
data_template:
name: Automated Backup {{ now().strftime('%Y-%m-%d') }}
- service: hassio.addon_stdin
data:
addon: 7be23ff5_dropbox_sync
input:
command: upload
#fine righe programmazione salvataggio su dropbox
##########################################
##########################################
##########################################
##########################################
# inseriamo automazione per l' avvio di homekit dopo 5 minuti
# questo per evitare che abbia problemi con la rete z-wave
# thx Dr. ZZs - https://www.youtube.com/watch?v=m46HUBhZoDQ
- alias: Start Homekit
trigger:
- platform: homeassistant
event: start
action:
- delay: 00:05 #5 minuti
- service: homekit.start
# fine righe automazione start homekit
##########################################
##########################################
##########################################
##########################################
#Inseriamo una notifica che avvisi di un tentato login fallito
- alias: Notifica Login Fallito
# copiata da https://community.home-assistant.io/t/how-to-get-the-ip-address-from-a-failed-login-notification/39899/15
trigger:
- platform: state
entity_id: persistent_notification.httplogin
condition:
- condition: template
value_template: "{{ trigger.to_state.state != off }}"
action:
- service: notify.telegram_marco
data_template:
title: "Tentativo di Login fallito su Home Assistant!"
message: "{{ states.persistent_notification.httplogin.attributes.message }}"
data:
url: http://www.ip-tracker.org/locator/ip-lookup.php?ip={{ states.persistent_notification.httplogin.attributes.message.split ("from ") [1]}}
#fine righe per notifica telegram tentato Login
##########################################
##########################################