-
Notifications
You must be signed in to change notification settings - Fork 17
/
zhimi.airpurifier.mb3.yaml
258 lines (240 loc) · 5.06 KB
/
zhimi.airpurifier.mb3.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
# https://home.miot-spec.com/spec/zhimi.airpurifier.mb3
external_components:
source: github://dhewg/esphome-miot@main
esphome:
name: purifier
friendly_name: Air Purifier
comment: Xiaomi Air Purifier 3/3H (zhimi.airpurifier.mb3)
project:
name: "dhewg.esphome-miot"
version: "zhimi.airpurifier.mb3"
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
miot_heartbeat_siid: 13
miot_heartbeat_piid: 9
switch:
- platform: "miot"
miot_siid: 2
miot_piid: 2
name: "Power"
icon: mdi:power
- 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: "Child Lock"
icon: mdi:lock
entity_category: config
binary_sensor:
- platform: "miot"
miot_siid: 15
miot_piid: 5
name: "Filter Door"
device_class: opening
entity_category: diagnostic
select:
- platform: "miot"
miot_siid: 2
miot_piid: 5
name: "Mode"
options:
0: "Auto"
1: "Sleep"
2: "Favorite"
3: "None"
- platform: "miot"
miot_siid: 2
miot_piid: 4
name: "Fan Level"
icon: mdi:fan
options:
1: "Low"
2: "Medium"
3: "High"
- platform: "miot"
miot_siid: 6
miot_piid: 1
name: "Display Brightness"
icon: mdi:brightness-6
entity_category: config
options:
0: "High"
1: "Low"
2: "Off"
- platform: "miot"
miot_siid: 15
miot_piid: 10
name: "Manual Level"
icon: mdi:speedometer
options:
1: "Level 1"
2: "Level 2"
3: "Level 3"
text_sensor:
- platform: "miot"
miot_siid: 2
miot_piid: 1
name: "Device Fault"
icon: mdi:fan-alert
entity_category: diagnostic
filters:
- map:
- "0 -> No Faults"
- "1 -> M1 Run"
- "2 -> M1 Stuck"
- "3 -> No Sensor"
- "4 -> Humidity Error"
- "5 -> Temperature Error"
- platform: "miot"
miot_siid: 13
miot_piid: 8
name: "AQI State"
icon: mdi:information-outline
filters:
- map:
- "0 -> Best"
- "1 -> Good"
- "2 -> Normal"
- "3 -> Bad"
- "4 -> Worse"
- "5 -> Unhealthy"
- platform: "miot"
miot_siid: 13
miot_piid: 5
name: "AQI Sensor State"
number:
- platform: "miot"
miot_siid: 10
miot_piid: 7
name: "Motor Favorite Speed"
icon: mdi:speedometer
min_value: 300
max_value: 2300
step: 1
- platform: "miot"
miot_siid: 10
miot_piid: 10
name: "Favorite Fan Level"
icon: mdi:speedometer
min_value: 0
max_value: 14
step: 1
sensor:
- 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
accuracy_decimals: 1
state_class: "measurement"
- 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"
- platform: "miot"
miot_siid: 12
miot_piid: 1
name: "Use Time"
entity_category: diagnostic
unit_of_measurement: "s"
icon: mdi:progress-clock
- platform: "miot"
miot_siid: 10
miot_piid: 8
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³"
state_class: "measurement"
- platform: "miot"
miot_siid: 13
miot_piid: 2
name: "Average AQI"
state_class: "measurement"
button:
- platform: "miot"
miot_siid: 8
miot_aiid: 1
name: "Toggle Power"
icon: mdi:power
- platform: "miot"
miot_siid: 4
miot_aiid: 1
miot_action_args: "3 0"
name: "Reset Filter Life"
icon: mdi:restart
entity_category: config
- platform: "miot"
miot_siid: 8
miot_aiid: 2
name: "Toggle Mode"
icon: mdi:cached