-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathdmaker.fan.p18.yaml
More file actions
155 lines (140 loc) · 2.95 KB
/
Copy pathdmaker.fan.p18.yaml
File metadata and controls
155 lines (140 loc) · 2.95 KB
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
# https://home.miot-spec.com/spec/dmaker.fan.p18
external_components:
source: github://dhewg/esphome-miot@main
esphome:
name: standing-fan
friendly_name: Smart Standing Fan 2
comment: Xiaomi Mi Smart Standing Fan 2 (dmaker.fan.p18)
project:
name: "dhewg.esphome-miot"
version: "dmaker.fan.p18"
esp8266:
board: esp_wroom_02
logger:
level: DEBUG
# Important: Disable UART1 logging to avoid hardware errors on main UART0
baud_rate: 0
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: GPIO15
rx_pin: GPIO13
baud_rate: 115200
miot:
id: miot_main
fan:
- platform: "miot"
name: "Fan"
state:
miot_siid: 2
miot_piid: 1
speed:
miot_siid: 2
miot_piid: 10
min_value: 1
max_value: 100
oscillating:
miot_siid: 2
miot_piid: 4
switch:
- platform: "miot"
miot_siid: 2
miot_piid: 7
name: "Indicator Lights"
icon: "mdi:lightbulb"
entity_category: config
- platform: "miot"
miot_siid: 2
miot_piid: 8
name: "Notification Sounds"
icon: "mdi:volume-high"
entity_category: config
- platform: "miot"
miot_siid: 3
miot_piid: 1
name: "Child Lock"
icon: "mdi:lock"
entity_category: config
select:
- platform: "miot"
id: "mode"
miot_siid: 2
miot_piid: 3
name: "Mode"
icon: "mdi:leaf"
options:
0: "Direct Breeze"
1: "Natural Breeze"
- platform: "miot"
miot_siid: 2
miot_piid: 5
name: "Oscillation Angle"
icon: "mdi:angle-obtuse"
options:
30: "30°"
60: "60°"
90: "90°"
120: "120°"
140: "140°"
number:
- platform: "miot"
miot_siid: 2
miot_piid: 2
name: "Fan Level"
icon: "mdi:fan-chevron-up"
min_value: 1
max_value: 4
step: 1
- platform: "miot"
miot_siid: 2
miot_piid: 6
name: "Off Delay"
icon: "mdi:clock-outline"
unit_of_measurement: "min"
device_class: duration
min_value: 0
max_value: 480
step: 1
button:
- platform: "miot"
miot_siid: 2
miot_aiid: 1
name: "Toggle Power"
icon: "mdi:power-cycle"
- platform: "template"
name: "Adjust Left"
icon: "mdi:pan-left"
on_press:
- lambda: id(miot_main).queue_command("set_properties 2 9 1");
- platform: "template"
name: "Adjust Right"
icon: "mdi:pan-right"
on_press:
- lambda: id(miot_main).queue_command("set_properties 2 9 2");
- platform: "miot"
name: "Toggle Mode"
icon: "mdi:leaf"
miot_siid: 4
miot_aiid: 1
- platform: "miot"
name: "Toggle Speed"
icon: "mdi:fan"
miot_siid: 4
miot_aiid: 2