-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
100 lines (94 loc) · 2.57 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
###############################
### Users ###
###############################
###############################
### Devices ###
###############################
###############################
### Sensors ###
###############################
###############################
### Climate ###
###############################
###############################
### Tracking ###
###############################
### Owntracks Refresh ###
- id: owntracks_refresh
alias: "Owntracks Refresh"
trigger:
- platform: time
minutes: '/15'
seconds: 0
action:
service: script.refresh_devices
###############################
### System Events ###
###############################
### Update Google Travel Times to Work every 5 mins ###
- id: update_morning_commute_sensor
alias: "Update morning commute"
initial_state: 'on'
trigger:
- platform: time
minutes: '/5'
seconds: 00
condition:
- condition: time
after: '08:00:00'
before: '11:00:00'
- condition: time
weekday:
- wed
- thu
- fri
- sat
- sun
action:
- service: sensor.google_travel_sensor_update
data:
entity_id: sensor.morning_commute
### Horizon based theme switching ###
- id: horizon_theme_switch
alias: 'Daylight automatic theme switching'
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: sun.sun
to: above_horizon
- platform: state
entity_id: sun.sun
to: below_horizon
action:
- service_template: frontend.set_theme
data_template:
name: >
{% if states.sun.sun.state == "above_horizon" %}
Light - Light Red
{% else %}
Dark - Light Red
{% endif %}
# Turn off lights when everybody leaves the house
- id: lights_off_when_gone
alias: 'Away Mode'
trigger:
platform: state
entity_id: group.all_devices
to: 'not_home'
action:
service: light.turn_off
entity_id: group.all_lights
###############################
### Maintenance ###
###############################
### HA Update Notification ###
- id: update_notify
alias: 'Update Available Notifications'
trigger:
platform: state
entity_id: updater.updater
action:
service: notify.notify
data:
message: 'Update for Home Assistant is available.'