/
lights.yaml
194 lines (183 loc) · 4.26 KB
/
lights.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#Lights Automation
- id: 7amBedroom
alias: Bedroom Light on and Noise Machine off at 7am
trigger:
platform: time
at: '07:00:00'
condition:
condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: device_tracker.scott
state: 'home'
- condition: state
entity_id: input_boolean.alarm_set
state: 'on'
action:
service: script.morning_alarm
- id: LightstripOffAtMidnight
alias: Lightstrip off at midnight if Plex idle
trigger:
platform: time
at: '00:00:01'
condition:
condition: state
entity_id: media_player.scottsplex
state: 'idle'
action:
service: light.turn_off
entity_id: light.lightstrip
- id: GarageLightsOnWhenDoorOpens
alias: Garage Lights On When Door Opens
trigger:
platform: state
entity_id: sensor.central_door, cover.garage_door
to: 'open'
condition:
condition: state
entity_id: light.garage_light
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.garage_light
data:
brightness: 255
- id: GarageLightOnWithMotion
alias: Garage Light On With Motion
trigger:
platform: state
entity_id: sensor.garage_motion
to: 'motion'
condition:
condition: state
entity_id: light.garage_light
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.garage_light
data:
brightness: 255
- id: GarageLightOffAfter5Mins
alias: Garage Light Off after 5 Minutes
trigger:
platform: state
entity_id: sensor.garage_motion
to: 'clear'
for:
minutes: 5
condition:
condition: state
entity_id: light.garage_light
state: 'on'
action:
service: homeassistant.turn_off
entity_id: light.garage_light
- id: HallwayLightOnWithMotion-Night
alias: Hallway Light On At Night With Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
to: 'motion'
condition:
condition: and
conditions:
- condition: time
after: '21:00:01'
before: '06:00:00'
- condition: state
entity_id: light.hallway_light
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.hallway_light
data:
brightness: 50
- id: HallwayLightOnWithMotion-Day
alias: Hallway Light On During The Day With Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
to: 'motion'
condition:
condition: and
conditions:
- condition: time
after: '06:00:01'
before: '21:00:00'
- condition: state
entity_id: light.hallway_light
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- id: HallwayLightOffNoMotion
alias: Hallway Light Off after No Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
to: 'clear'
for:
seconds: 5
condition:
condition: state
entity_id: light.hallway_light
state: 'on'
action:
service: homeassistant.turn_off
entity_id: light.hallway_light
- id: KitchenLightOnWithMotion
alias: Kitchen Light On With Motion
trigger:
platform: state
entity_id: sensor.kitchen_motion
to: 'motion'
condition:
condition: state
entity_id: light.kitchen_light
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.kitchen_light
data:
brightness: 255
- id: ComingHomeLightsOn
alias: Coming Home Lights On
trigger:
platform: state
entity_id: sensor.front_door, sensor.central_door
to: 'open'
condition:
condition: state
entity_id: input_boolean.entry_lights
state: 'off'
action:
- service: homeassistant.turn_on
entity_id: group.insidelights
data:
brightness: 255
- service: input_boolean.turn_on
entity_id: input_boolean.entry_lights
- id: ResetMorningLightsBoolean5am
alias: Reset Morning Lights Boolean 5am
trigger:
platform: time
at: '05:00:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.morning_lights
- alias: Reset Morning Lights Boolean 7am
trigger:
platform: time
at: '07:00:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.morning_lights