-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
166 lines (166 loc) · 4.26 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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#AUTOMATIONS
- alias: 'Alexa Lights Automation On'
initial_state: false
trigger:
platform: state
entity_id: input_boolean.alexa_lights_toggle
from: 'off'
to: 'on'
condition:
condition: state
entity_id: input_boolean.alexa_toggle_call
state: 'on'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.alexa_toggle_call
- service: script.turn_on
data_template:
entity_id: >
{% if (states.sensor.time.state < "06:50") and (states.sensor.time.state > "06:00") %}
script.breakfast_lights
{% else %}
script.teatime_lights
{% endif %}
- alias: 'Alexa Lights Automation Off'
initial_state: false
trigger:
platform: state
entity_id: input_boolean.alexa_lights_toggle
from: 'on'
to: 'off'
condition:
condition: state
entity_id: input_boolean.alexa_toggle_call
state: 'on'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.alexa_toggle_call
- service: script.turn_on
data_template:
entity_id: >
{% if (states.sensor.time.state < "06:50") or (states.sensor.time.state > "22:00") %}
script.slow_fade_off_downstairs
{% else %}
script.lights_off
{% endif %}
- alias: 'Dining brightness reset'
trigger:
platform: state
entity_id: light.dining
from: 'off'
to: 'on'
action:
- service: light.turn_on
data:
entity_id: light.dining
brightness: 100
transition: 1.1
- alias: 'Window brightness reset'
trigger:
platform: state
entity_id: light.window
from: 'off'
to: 'on'
action:
- service: light.turn_on
data:
entity_id: light.window
brightness: 100
transition: 1.1
- alias: 'Couch brightness reset'
trigger:
platform: state
entity_id: light.couch
from: 'off'
to: 'on'
action:
- service: light.turn_on
data:
entity_id: light.couch
brightness: 100
transition: 1.1
- alias: 'Kitchen LED brightness reset'
trigger:
platform: state
entity_id: light.kitchen_strip_light
from: 'off'
to: 'on'
action:
- service: light.turn_on
data:
entity_id: light.kitchen_strip_light
rgb_color: [0, 150, 150]
transition: 1.1
- alias: 'Livingroom Lights on reset boolean'
trigger:
platform: state
entity_id: group.Livingroom_Lights
from: 'off'
to: 'on'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.alexa_lights_toggle
- alias: 'Livingroom Lights off reset boolean'
trigger:
platform: state
entity_id: group.Livingroom_Lights
from: 'on'
to: 'off'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.alexa_lights_toggle
- alias: 'All lights on reset boolean'
trigger:
platform: state
entity_id: group.all_lights
from: 'off'
to: 'on'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.alexa_lights_toggle
- alias: 'All lights off reset boolean'
trigger:
platform: state
entity_id: group.all_lights
from: 'on'
to: 'off'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.alexa_lights_toggle
#
- alias: 'Reset alexa boolean on start up'
trigger:
platform: homeassistant
event: start
action:
- service: script.turn_on
data:
entity_id: script.alexa_boolean_reset
- alias: 'Heating turned on'
trigger:
platform: state
entity_id: sensor.downstairs_thermostat_hvac_state
from: 'off'
to: 'heating'
action:
- service: tts.google_say
data:
entity_id: media_player.tts_bluetooth_speaker
message: 'The heating has turned on'
- alias: 'Heating turned off'
trigger:
platform: state
entity_id: sensor.downstairs_thermostat_hvac_state
from: 'heating'
to: 'off'
action:
- service: tts.google_say
data:
entity_id: media_player.tts_bluetooth_speaker
message: 'The heating has turned off'