forked from dhewg/esphome-miot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zhimi.airpurifier.za1.yaml
336 lines (320 loc) · 7.04 KB
/
zhimi.airpurifier.za1.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# https://home.miot-spec.com/spec/zhimi.airpurifier.za1
external_components:
source: github://dhewg/esphome-miot@main
esphome:
name: purifier
friendly_name: Air Purifier
comment: Smartmi Air Purifier (zhimi.airpurifier.za1)
project:
name: "dhewg.esphome-miot"
version: "zhimi.airpurifier.za1"
esp32:
board: esp32dev
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:
ignore_efuse_custom_mac: true
ignore_efuse_mac_crc: true
time:
- platform: homeassistant
id: homeassistant_time
logger:
level: DEBUG
api:
encryption:
key: !secret api_encryption_key
reboot_timeout: 0s
services:
- service: mcu_command
variables:
command: string
then:
- lambda: 'id(miot_main).queue_command(command);'
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
password: !secret wifi_ap_password
captive_portal:
uart:
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
miot:
id: miot_main
switch:
- platform: "miot"
miot_siid: 2
miot_piid: 1
name: "Power"
icon: mdi:power
device_class: outlet
- platform: "miot"
miot_siid: 5
miot_piid: 1
name: "Notification Sounds"
icon: mdi:volume-high
entity_category: config
- platform: "miot"
miot_siid: 7
miot_piid: 1
name: "Physical Control Locked"
icon: mdi:lock
entity_category: config
- platform: "miot"
miot_siid: 15
miot_piid: 13
name: "Gesture"
icon: mdi:hand-back-left
entity_category: config
select:
- platform: "miot"
miot_siid: 2
miot_piid: 5
name: "Mode"
icon: mdi:auto-mode
options:
0: "Auto"
1: "Sleep"
2: "Favorite"
- platform: "miot"
miot_siid: 6
miot_piid: 1
name: "Brightness"
icon: mdi:brightness-6
entity_category: config
options:
0: "Bright"
1: "Light"
2: "Off"
- platform: "miot"
miot_siid: 15
miot_piid: 12
name: "Country Code"
icon: mdi:earth-box
entity_category: config
options:
1: "America"
2: "Canada"
3: "Singapore"
4: "Europe"
5: "Australian"
6: "Korea"
7: "China"
8: "France"
9: "Japanese"
10: "Taiwan"
disabled_by_default: true
number:
- platform: "miot"
miot_siid: 10
miot_piid: 10
name: "Favorite Fan Level"
device_class: wind_speed
icon: mdi:fan
mode: slider
min_value: 0
max_value: 14
step: 1
- platform: "miot"
miot_siid: 9
miot_piid: 1
name: "Filter Max Time"
icon: mdi:timer-settings
unit_of_measurement: "hour"
mode: slider
min_value: 2000
max_value: 6000
step: 1000
disabled_by_default: true
- platform: "miot"
miot_siid: 9
miot_piid: 2
name: "Filter Time Set"
icon: mdi:timer-settings
unit_of_measurement: "hours"
mode: slider
min_value: 0
max_value: 10000
step: 1000
disabled_by_default: true
text_sensor:
- platform: "miot"
miot_siid: 2
miot_piid: 2
name: "Device Fault"
icon: mdi:fan-alert
entity_category: diagnostic
filters:
- map:
- "0 -> No Faults"
- "1 -> Motor failure"
- "2 -> Motor stalls"
- "3 -> Sensor missing"
- "4 -> Abnormal humidity"
- "5 -> Abnormal temperature"
disabled_by_default: true
- platform: "miot"
miot_siid: 15
miot_piid: 6
name: "Reboot Cause"
entity_category: diagnostic
filters:
- map:
- "0 -> Hardware"
- "1 -> Human"
- "2 -> Upgrade"
- "3 -> Watchdog"
disabled_by_default: true
- platform: "miot"
miot_siid: 13
miot_piid: 5
name: "Sensor State"
entity_category: diagnostic
filters:
- map:
- "0 -> Normal mode"
- "1 -> Sleep mode"
disabled_by_default: true
- platform: "miot"
miot_siid: 13
miot_piid: 4
name: "Aqi Zone"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 14
miot_piid: 1
name: "RFID Tag"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 14
miot_piid: 2
name: "RFID Factory ID"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 14
miot_piid: 3
name: "RFID Product ID"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 14
miot_piid: 4
name: "RFID Time"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 14
miot_piid: 5
name: "RFID Serial Num"
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 15
miot_piid: 8
name: "HW Version"
icon: mdi:numeric
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 15
miot_piid: 9
name: "SGP Ethanol"
icon: mdi:numeric
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 15
miot_piid: 10
name: "SGP Serial"
icon: mdi:numeric
entity_category: diagnostic
disabled_by_default: true
- platform: "miot"
miot_siid: 15
miot_piid: 11
name: "SGP Version"
icon: mdi:numeric
entity_category: diagnostic
disabled_by_default: true
sensor:
- platform: "miot"
miot_siid: 3
miot_piid: 1
name: "Air Quality"
device_class: aqi
state_class: measurement
- platform: "miot"
miot_siid: 3
miot_piid: 7
name: "Relative Humidity"
unit_of_measurement: "%"
device_class: humidity
state_class: measurement
- platform: "miot"
miot_siid: 3
miot_piid: 6
name: "PM2.5 Density"
unit_of_measurement: "µg/m³"
device_class: pm25
state_class: measurement
- platform: "miot"
miot_siid: 3
miot_piid: 8
name: "Temperature"
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
- platform: "miot"
miot_siid: 4
miot_piid: 3
name: "Filter Life Level"
unit_of_measurement: "%"
icon: mdi:air-filter
- platform: "miot"
miot_siid: 4
miot_piid: 5
name: "Filter Used Time"
entity_category: diagnostic
unit_of_measurement: "h"
device_class: duration
icon: mdi:air-filter
disabled_by_default: true
- platform: "miot"
miot_siid: 10
miot_piid: 11
name: "Motor Speed"
unit_of_measurement: "rpm"
icon: mdi:fan
- platform: "miot"
miot_siid: 13
miot_piid: 1
name: "Total Purified Volume"
unit_of_measurement: "m³"
device_class: gas
state_class: total_increasing
disabled_by_default: true
- platform: "miot"
miot_siid: 13
miot_piid: 2
name: "Average AQI"
device_class: aqi
state_class: measurement
disabled_by_default: true
- platform: "miot"
miot_siid: 12
miot_piid: 1
name: "Use Time"
unit_of_measurement: "s"
device_class: duration
state_class: total_increasing
disabled_by_default: true