Skip to content

Commit 91c84b7

Browse files
Matze89xdhewg
authored andcommitted
Add configuration for Xiaomi Air Purifier Pro H
This YAML configuration file defines the settings and parameters for the Xiaomi Air Purifier Pro H (zhimi.airpurifier.va1), including components for Wi-Fi, API, sensors, and controls.
1 parent bc7b123 commit 91c84b7

File tree

1 file changed

+339
-0
lines changed

1 file changed

+339
-0
lines changed

config/zhimi.airpurifier.va1.yaml

Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
1+
# https://home.miot-spec.com/spec/zhimi.airpurifier.va1 Info
2+
3+
external_components:
4+
source: github://dhewg/esphome-miot@main
5+
6+
esphome:
7+
name: purifierproh
8+
friendly_name: PurifierProH
9+
comment: Xiaomi Air Purifier Pro H (zhimi.airpurifier.va1)
10+
project:
11+
name: "dhewg.esphome-miot"
12+
version: "zhimi.airpurifier.va1"
13+
14+
esp32:
15+
board: esp32dev
16+
framework:
17+
type: esp-idf
18+
sdkconfig_options:
19+
CONFIG_FREERTOS_UNICORE: y
20+
advanced:
21+
ignore_efuse_custom_mac: true
22+
ignore_efuse_mac_crc: true
23+
24+
time:
25+
- platform: homeassistant
26+
id: homeassistant_time
27+
28+
logger:
29+
level: DEBUG
30+
31+
api:
32+
encryption:
33+
key: "XXX"
34+
reboot_timeout: 0s
35+
services:
36+
- service: mcu_command
37+
variables:
38+
command: string
39+
then:
40+
- lambda: 'id(miot_main).queue_command(command);'
41+
42+
ota:
43+
- platform: esphome
44+
password: "XXX"
45+
46+
wifi:
47+
ssid: !secret wifi_ssid
48+
password: !secret wifi_password
49+
50+
ap:
51+
ssid: "Purifierproh Fallback Hotspot"
52+
password: "XXX"
53+
54+
captive_portal:
55+
56+
uart:
57+
tx_pin: GPIO17
58+
rx_pin: GPIO16
59+
baud_rate: 115200
60+
61+
miot:
62+
id: miot_main
63+
miot_heartbeat_siid: 13
64+
miot_heartbeat_piid: 9
65+
66+
fan:
67+
- platform: "miot"
68+
name: "Fan"
69+
state:
70+
miot_siid: 2
71+
miot_piid: 2
72+
speed:
73+
miot_siid: 2
74+
miot_piid: 4
75+
min_value: 1
76+
max_value: 3
77+
preset_modes:
78+
miot_siid: 2
79+
miot_piid: 5
80+
options:
81+
0: "Auto"
82+
1: "Sleep"
83+
2: "Favorite"
84+
85+
switch:
86+
- platform: "miot"
87+
miot_siid: 7
88+
miot_piid: 1
89+
name: "Child Lock"
90+
icon: mdi:lock
91+
entity_category: config
92+
93+
binary_sensor:
94+
- platform: "miot"
95+
miot_siid: 15
96+
miot_piid: 5
97+
name: "Filter Door"
98+
device_class: opening
99+
entity_category: diagnostic
100+
101+
select:
102+
- platform: "miot"
103+
miot_siid: 2
104+
miot_piid: 4
105+
name: "Fan Level"
106+
icon: mdi:fan
107+
options:
108+
1: "Low"
109+
2: "Medium"
110+
3: "High"
111+
- platform: "miot"
112+
miot_siid: 2
113+
miot_piid: 5
114+
name: "Fan Mode"
115+
icon: mdi:fan
116+
options:
117+
0: "Auto"
118+
1: "Sleep"
119+
2: "Favorite"
120+
- platform: "miot"
121+
miot_siid: 6
122+
miot_piid: 1
123+
name: "Display Brightness"
124+
icon: mdi:brightness-6
125+
entity_category: config
126+
options:
127+
0: "High"
128+
1: "Low"
129+
2: "Off"
130+
131+
text_sensor:
132+
- platform: "miot"
133+
miot_siid: 2
134+
miot_piid: 1
135+
name: "Device Fault"
136+
icon: mdi:fan-alert
137+
entity_category: diagnostic
138+
filters:
139+
- map:
140+
- "0 -> No Faults"
141+
- "1 -> M1 Run"
142+
- "2 -> M1 Stuck"
143+
- "3 -> No Sensor"
144+
- "4 -> Humidity Error"
145+
- "5 -> Temperature Error"
146+
- "6 -> Timer Error 1"
147+
- "7 -> Timer Error 2"
148+
- platform: "miot"
149+
miot_siid: 13
150+
miot_piid: 8
151+
name: "AQI State"
152+
icon: mdi:information-outline
153+
filters:
154+
- map:
155+
- "0 -> Best"
156+
- "1 -> Good"
157+
- "2 -> Normal"
158+
- "3 -> Bad"
159+
- "4 -> Worse"
160+
- "5 -> Unhealthy"
161+
- platform: "miot"
162+
miot_siid: 13
163+
miot_piid: 5
164+
name: "AQI Sensor State"
165+
166+
- platform: "miot"
167+
miot_siid: 14
168+
miot_piid: 1
169+
name: "RFID Tag"
170+
icon: mdi:barcode
171+
entity_category: diagnostic
172+
- platform: "miot"
173+
miot_siid: 14
174+
miot_piid: 2
175+
name: "RFID Factory ID"
176+
icon: mdi:barcode
177+
entity_category: diagnostic
178+
- platform: "miot"
179+
miot_siid: 14
180+
miot_piid: 3
181+
name: "RFID Product ID"
182+
icon: mdi:barcode
183+
entity_category: diagnostic
184+
- platform: "miot"
185+
miot_siid: 14
186+
miot_piid: 4
187+
name: "RFID Time"
188+
icon: mdi:barcode
189+
entity_category: diagnostic
190+
- platform: "miot"
191+
miot_siid: 14
192+
miot_piid: 5
193+
name: "RFID Serial Number"
194+
icon: mdi:barcode
195+
entity_category: diagnostic
196+
197+
number:
198+
- platform: "miot"
199+
miot_siid: 10
200+
miot_piid: 2
201+
name: "Motorspeed 5 High"
202+
unit_of_measurement: "rpm"
203+
icon: mdi:fan
204+
min_value: 300
205+
max_value: 2100
206+
step: 10
207+
entity_category: config
208+
- platform: "miot"
209+
miot_siid: 10
210+
miot_piid: 3
211+
name: "Motorspeed 3 Medium 1"
212+
unit_of_measurement: "rpm"
213+
icon: mdi:fan
214+
min_value: 300
215+
max_value: 2100
216+
step: 10
217+
entity_category: config
218+
- platform: "miot"
219+
miot_siid: 10
220+
miot_piid: 4
221+
name: "Motorspeed 4 Medium 2"
222+
unit_of_measurement: "rpm"
223+
icon: mdi:fan
224+
min_value: 300
225+
max_value: 2100
226+
step: 10
227+
entity_category: config
228+
- platform: "miot"
229+
miot_siid: 10
230+
miot_piid: 5
231+
name: "Motorspeed 2 Low"
232+
unit_of_measurement: "rpm"
233+
icon: mdi:fan
234+
min_value: 300
235+
max_value: 2100
236+
step: 10
237+
entity_category: config
238+
- platform: "miot"
239+
miot_siid: 10
240+
miot_piid: 6
241+
name: "Motorspeed 1 Sleep"
242+
unit_of_measurement: "rpm"
243+
icon: mdi:fan
244+
min_value: 300
245+
max_value: 2100
246+
step: 10
247+
entity_category: config
248+
- platform: "miot"
249+
miot_siid: 10
250+
miot_piid: 10
251+
name: "Motor Favorite Level"
252+
unit_of_measurement: "rpm"
253+
icon: mdi:speedometer
254+
min_value: 0
255+
max_value: 9
256+
step: 1
257+
entity_category: config
258+
- platform: "miot"
259+
miot_siid: 5
260+
miot_piid: 2
261+
name: "Notification Volume"
262+
icon: mdi:volume-high
263+
min_value: 0
264+
max_value: 100
265+
step: 10
266+
entity_category: config
267+
268+
sensor:
269+
- platform: "miot"
270+
miot_siid: 3
271+
miot_piid: 6
272+
name: "PM2.5 Density"
273+
unit_of_measurement: "µg/m³"
274+
device_class: pm25
275+
state_class: "measurement"
276+
- platform: "miot"
277+
miot_siid: 3
278+
miot_piid: 7
279+
name: "Relative Humidity"
280+
unit_of_measurement: "%"
281+
device_class: humidity
282+
state_class: "measurement"
283+
- platform: "miot"
284+
miot_siid: 3
285+
miot_piid: 8
286+
name: "Temperature"
287+
unit_of_measurement: "°C"
288+
device_class: temperature
289+
accuracy_decimals: 1
290+
state_class: "measurement"
291+
- platform: "miot"
292+
miot_siid: 4
293+
miot_piid: 3
294+
name: "Filter Life Level"
295+
unit_of_measurement: "%"
296+
icon: mdi:air-filter
297+
- platform: "miot"
298+
miot_siid: 4
299+
miot_piid: 5
300+
name: "Filter Used Time"
301+
entity_category: diagnostic
302+
unit_of_measurement: "h"
303+
- platform: "miot"
304+
miot_siid: 12
305+
miot_piid: 1
306+
name: "Use Time"
307+
entity_category: diagnostic
308+
unit_of_measurement: "s"
309+
icon: mdi:progress-clock
310+
- platform: "miot"
311+
miot_siid: 10
312+
miot_piid: 8
313+
name: "Motor Speed"
314+
unit_of_measurement: "rpm"
315+
icon: mdi:fan
316+
- platform: "miot"
317+
miot_siid: 13
318+
miot_piid: 1
319+
name: "Total Purified Volume"
320+
unit_of_measurement: ""
321+
entity_category: diagnostic
322+
state_class: "measurement"
323+
- platform: "miot"
324+
miot_siid: 13
325+
miot_piid: 2
326+
name: "Average AQI"
327+
state_class: "measurement"
328+
329+
button:
330+
- platform: "miot"
331+
miot_siid: 8
332+
miot_aiid: 1
333+
name: "Toggle Power"
334+
icon: mdi:power
335+
- platform: "miot"
336+
miot_siid: 8
337+
miot_aiid: 2
338+
name: "Toggle Mode"
339+
icon: mdi:cached

0 commit comments

Comments
 (0)