-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
143 lines (132 loc) · 3.3 KB
/
scripts.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Home
##################
welcome_home:
sequence:
- service: script.turn_on
entity_id:
- script.play_sonos
- script.sundown_lights
- script.unlock_sesame_lock
- script.turn_off_climate_eco
leaving_home:
sequence:
- service: script.turn_on
entity_id:
- script.interior_off
- script.turn_on_climate_eco
go_to_sleep:
sequence:
- service: script.turn_on
entity_id:
- script.interior_off
- script.lock_sesame_lock
- script.bedtime_climate_sequence
interior_off:
sequence:
- service: media_player.turn_off
entity_id: media_player.samsung_un55ks8500
- service: media_player.media_stop
entity_id: group.music_players
- service: light.turn_off
entity_id: all
- service: switch.turn_off
entity_id: switch.christmas_lights
# Thermostat
##################
# First set the thermostat low, then delay for sleeping time, then reset again
bedtime_climate_sequence:
sequence:
- service: climate.set_temperature
data:
entity_id: climate.hallway_thermostat
temperature: 60
hvac_mode: heat
- delay:
hours: 7
minutes: 45
- service: climate.set_temperature
data:
entity_id: climate.hallway_thermostat
temperature: 68
hvac_mode: heat
- delay:
hours: 1
- service: climate.set_temperature
data:
entity_id: climate.hallway_thermostat
temperature: 60
hvac_mode: heat
turn_on_climate_eco:
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.hallway_thermostat
preset_mode: "eco"
turn_off_climate_eco:
sequence:
- condition: state
entity_id: group.family
state: "home"
- service: climate.set_preset_mode
data:
entity_id: climate.hallway_thermostat
preset_mode: "none"
- service: climate.set_temperature
data:
entity_id: climate.hallway_thermostat
temperature: 60
hvac_mode: heat
# Lock
##################
lock_sesame_lock:
sequence:
- service: lock.lock
entity_id: lock.door
unlock_sesame_lock:
sequence:
- service: lock.unlock
entity_id: lock.door
# Sonos
##################
play_sonos:
sequence:
- condition: state
entity_id: media_player.living_room
state: "paused"
- service: sonos.join
data:
master: media_player.living_room
entity_id: all
# Set a quiet music volume
- service: media_player.volume_set
data:
entity_id: media_player.living_room
volume_level: 0.08
# Play some music
- service: media_player.select_source
data:
entity_id: media_player.living_room
source: "Ratatat"
# Lights
##################
turn_on_lights:
sequence:
- service: hue.hue_activate_scene
data:
group_name: Living Room
scene_name: Relax
- service: hue.hue_activate_scene
data:
group_name: Kitchen
scene_name: Read
- service: switch.turn_on
entity_id: switch.christmas_lights
sundown_lights:
sequence:
# If the sun is down, turn on all the lights
- condition: state
entity_id: sun.sun
state: "below_horizon"
- service: script.turn_on
entity_id:
- script.turn_on_lights