-
Notifications
You must be signed in to change notification settings - Fork 2
/
scripts.yaml
executable file
·125 lines (113 loc) · 3.98 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
###############################################
# 小米扫地机器人区域打扫,适合二代拥有地图记忆功能
# set_vacuum_room_hallway:
# alias: "打扫玄关"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[22250, 28900, 25500, 31466, 1]]
# set_vacuum_room_dining:
# alias: "打扫厨房饭厅"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[20300, 26800, 21850, 28300, 1], [22250, 25640, 25500, 28900, 1]]
# set_vacuum_room_living:
# alias: "打扫客厅过道"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[18000, 24800, 21850, 25640, 1], [22250, 21250, 25500, 25640, 1]]
# set_vacuum_room_studyroom:
# alias: "打扫书房"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[20000, 21200, 21700, 24600, 1]]
# set_vacuum_room_mainbedroom:
# alias: "打扫主卧"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[15700, 17800, 18640, 22752, 1]]
# set_vacuum_room_bedroom:
# alias: "打扫次卧"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: app_zoned_clean
# params: [[14000, 24900, 17000, 28000, 1]]
set_vacuum_speed_quiet:
alias: "扫地安静模式"
sequence:
- service: vacuum.set_fan_speed
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
fan_speed: Quiet
set_vacuum_speed_balance:
alias: "扫地标准模式"
sequence:
- service: vacuum.set_fan_speed
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
fan_speed: Balanced
set_vacuum_speed_turbo:
alias: "扫地强力模式"
sequence:
- service: vacuum.set_fan_speed
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
fan_speed: Turbo
set_vacuum_speed_max:
alias: "扫地全速模式"
sequence:
- service: vacuum.set_fan_speed
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
fan_speed: Max
#################################################
# vacuum_room_mode:
# alias: "分区打扫"
# sequence:
# - service: script.turn_on
# data_template:
# entity_id: >
# {% if is_state("input_select.vacuum_room_select", "玄关") %}
# script.set_vacuum_room_hallway
# {% elif is_state("input_select.vacuum_room_select", "厨房饭厅") %}
# script.set_vacuum_room_dining
# {% elif is_state("input_select.vacuum_room_select", "客厅过道") %}
# script.set_vacuum_room_living
# {% elif is_state("input_select.vacuum_room_select", "书房") %}
# script.set_vacuum_room_studyroom
# {% elif is_state("input_select.vacuum_room_select", "主卧室") %}
# script.set_vacuum_room_mainbedroom
# {% elif is_state("input_select.vacuum_room_select", "次卧室") %}
# script.set_vacuum_room_bedroom
# {% endif %}
vacuum_speed_select:
alias: "吸力选择"
sequence:
- service: script.turn_on
data_template:
entity_id: >
{% if is_state("input_select.vacuum_fan_select", "安静") %}
script.set_vacuum_speed_quiet
{% elif is_state("input_select.vacuum_fan_select", "标准") %}
script.set_vacuum_speed_balance
{% elif is_state("input_select.vacuum_fan_select", "强力") %}
script.set_vacuum_speed_turbo
{% elif is_state("input_select.vacuum_fan_select", "全速") %}
script.set_vacuum_speed_max
{% endif %}