-
Notifications
You must be signed in to change notification settings - Fork 17
/
zhimi.airp.rmb1.yaml
205 lines (189 loc) · 4.03 KB
/
zhimi.airp.rmb1.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
# https://home.miot-spec.com/spec/zhimi.airp.rmb1
external_components:
source: github://dhewg/esphome-miot@main
esphome:
name: purifier
friendly_name: Air Purifier
comment: Xiaomi Smart Air Purifier 4 Lite (zhimi.airp.rmb1)
project:
name: "dhewg.esphome-miot"
version: "zhimi.airp.rmb1"
esp32:
board: esp32dev
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:
ignore_efuse_custom_mac: true
ignore_efuse_mac_crc: true
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: 11
miot_heartbeat_piid: 4
switch:
- platform: "miot"
miot_siid: 2
miot_piid: 1
name: "Power"
icon: mdi:power
- platform: "miot"
miot_siid: 6
miot_piid: 1
name: "Notification Sounds"
icon: mdi:volume-high
entity_category: config
- platform: "miot"
miot_siid: 8
miot_piid: 1
name: "Child Lock"
icon: mdi:lock
entity_category: config
select:
- platform: "miot"
miot_siid: 2
miot_piid: 4
name: "Mode"
options:
0: "Auto"
1: "Sleep"
2: "Favorite"
- platform: "miot"
miot_siid: 13
miot_piid: 2
name: "Display Brightness"
icon: mdi:brightness-6
entity_category: config
options:
0: "Off"
1: "Low"
2: "High"
- platform: "miot"
miot_siid: 14
miot_piid: 1
name: "Temperature Display Unit"
icon: mdi:temperature-celsius
entity_category: config
options:
1: "Celsius"
2: "Fahrenheit"
text_sensor:
- platform: "miot"
miot_siid: 1
miot_piid: 5
miot_poll: false
name: "Serial Number"
icon: mdi:numeric
entity_category: diagnostic
- platform: "miot"
miot_siid: 2
miot_piid: 2
name: "Device Fault"
icon: mdi:fan-alert
entity_category: diagnostic
filters:
- map:
- "0 -> No Faults"
- "2 -> Motor Stop"
- "3 -> Sensor Lost"
number:
- platform: "miot"
miot_siid: 9
miot_piid: 11
name: "Favorite Level"
icon: mdi:speedometer
min_value: 0
max_value: 14
step: 1
sensor:
- platform: "miot"
miot_siid: 3
miot_piid: 1
name: "Relative Humidity"
unit_of_measurement: "%"
device_class: humidity
state_class: "measurement"
- platform: "miot"
miot_siid: 3
miot_piid: 4
name: "PM2.5 Density"
unit_of_measurement: "µg/m³"
device_class: pm25
state_class: "measurement"
- platform: "miot"
miot_siid: 3
miot_piid: 7
name: "Temperature"
unit_of_measurement: "°C"
device_class: temperature
accuracy_decimals: 1
state_class: "measurement"
- platform: "miot"
miot_siid: 4
miot_piid: 1
name: "Filter Life Level"
unit_of_measurement: "%"
icon: mdi:air-filter
- platform: "miot"
miot_siid: 4
miot_piid: 3
name: "Filter Used Time"
entity_category: diagnostic
unit_of_measurement: "d"
icon: mdi:air-filter
- platform: "miot"
miot_siid: 4
miot_piid: 4
name: "Filter Lifetime Remaining"
entity_category: diagnostic
unit_of_measurement: "d"
icon: mdi:air-filter
- platform: "miot"
miot_siid: 9
miot_piid: 1
name: "Motor Speed"
unit_of_measurement: "rpm"
icon: mdi:fan
button:
- platform: "miot"
miot_siid: 2
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: 9
miot_aiid: 1
name: "Toggle Mode"
icon: mdi:cached