forked from 9R/esphome-miot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zhimi.airp.mb4a.yaml
160 lines (144 loc) · 3.01 KB
/
zhimi.airp.mb4a.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
# https://home.miot-spec.com/spec/zhimi.airp.mb4a
# https://home.miot-spec.com/spec/zhimi.airpurifier.mb4
external_components:
source: github://dhewg/esphome-miot@main
esphome:
name: purifier
friendly_name: Air Purifier
comment: Mi Air Purifier 3C (zhimi.airp.mb4a)
project:
name: "dhewg.esphome-miot"
version: "zhimi.airp.mb4a"
esp32:
board: esp32dev
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:
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:
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: 9
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"
text_sensor:
- platform: "miot"
miot_siid: 1
miot_piid: 3
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:
- "null -> No Faults"
number:
- platform: "miot"
miot_siid: 7
miot_piid: 2
name: "Display Brightness"
icon: mdi:brightness-6
entity_category: config
min_value: 0
max_value: 8
step: 1
- platform: "miot"
miot_siid: 9
miot_piid: 3
name: "Favorite Speed"
icon: mdi:speedometer
min_value: 300
max_value: 2200
step: 1
sensor:
- 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: 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: "h"
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: 4
miot_aiid: 1
miot_action_args: "3 0"
name: "Reset Filter Life"
icon: mdi:restart
entity_category: config