-
Notifications
You must be signed in to change notification settings - Fork 2
/
automations.yaml
executable file
·179 lines (179 loc) · 4.13 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
167
168
169
170
171
172
173
174
175
176
177
178
179
- id: '1552404872353'
alias: m1亮度调控1
trigger:
- at: 07:30:00
platform: time
condition: []
action:
- data:
entity_id: input_number.phicomm_m1_led
value: 25
service: input_number.set_value
- id: '1552405042742'
alias: m1亮度调控2
trigger:
- event: sunset
platform: sun
condition: []
action:
- data:
entity_id: input_number.phicomm_m1_led
value: 50
service: input_number.set_value
- id: '1552405177797'
alias: m1亮度调控3
trigger:
- at: 00:30:00
platform: time
condition: []
action:
- data:
entity_id: input_number.phicomm_m1_led
value: 0
service: input_number.set_value
- id: '1553963917565'
alias: 扫地机器人吸力调节
trigger:
- entity_id: input_select.vacuum_fan_select
platform: state
condition: []
action:
- service: script.vacuum_speed_select
- id: '1560011504879'
alias: 客厅分控1
trigger:
- entity_id: switch.livingroom_blue
platform: state
- entity_id: switch.livingroom_white
platform: state
- entity_id: switch.livingroom_yellow
platform: state
condition:
- condition: state
entity_id: switch.livingroom_blue
state: 'off'
- condition: state
entity_id: switch.livingroom_white
state: 'off'
- condition: state
entity_id: switch.livingroom_yellow
state: 'off'
action:
- data_template:
entity_id: switch.livingroom_switch
state: 'off'
service: python_script.set_state
- id: '1559405845476'
alias: 客厅分控2
trigger:
- entity_id: switch.livingroom_switch
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data_template:
entity_id: switch.livingroom_blue
state: 'on'
service: python_script.set_state
- data_template:
entity_id: switch.livingroom_white
state: 'on'
service: python_script.set_state
- data_template:
entity_id: switch.livingroom_yellow
state: 'on'
service: python_script.set_state
- id: '1559405933971'
alias: 客厅分控3
trigger:
- entity_id: switch.livingroom_switch
from: 'on'
platform: state
to: 'off'
condition: []
action:
- service: python_script.set_state
data_template:
entity_id: switch.livingroom_blue
state: 'off'
- service: python_script.set_state
data_template:
entity_id: switch.livingroom_white
state: 'off'
- service: python_script.set_state
data_template:
entity_id: switch.livingroom_yellow
state: 'off'
- id: '1560012404918'
alias: 客厅分控4
trigger:
- entity_id: switch.livingroom_blue
from: 'off'
platform: state
to: 'on'
- entity_id: switch.livingroom_white
from: 'off'
platform: state
to: 'on'
- entity_id: switch.livingroom_yellow
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: switch.livingroom_switch
state: 'off'
action:
- alias: 客厅分控2关
data_template:
entity_id: automation.ke_ting_fen_kong_2
service: automation.turn_off
- data_template:
entity_id: switch.livingroom_switch
state: 'on'
service: python_script.set_state
- alias: 客厅分控2开
data_template:
entity_id: automation.ke_ting_fen_kong_2
service: automation.turn_on
- id: '1559462879902'
alias: 门铃自动
trigger:
- event_data:
click_type: single
entity_id: binary_sensor.doorbell
event_type: xiaomi_aqara.click
platform: event
condition: []
action:
- data_template:
entity_id: binary_sensor.doorbell
state: 'on'
service: python_script.set_state
- delay: '10'
- data_template:
entity_id: binary_sensor.doorbell
state: 'off'
service: python_script.set_state
- id: '1565793068583'
alias: 厨房夜灯
trigger:
- entity_id: binary_sensor.motion_sensor_1
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
condition: sun
action:
- data:
brightness_pct: 80
entity_id: light.kitchen_gateway_light
transition: 1
service: light.turn_on
- delay: '60'
- data:
entity_id: light.kitchen_gateway_light
transition: 1
service: light.turn_off