-
Notifications
You must be signed in to change notification settings - Fork 22
/
example_ld2450.yaml
185 lines (154 loc) · 2.68 KB
/
example_ld2450.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
esphome:
name: hlk-presence
friendly_name: hlk-presence
external_components:
- source:
type: git
url: https://github.com/uncle-yura/esphome-ld2450
ref: master
components: [ ld2450 ]
esp8266:
board: d1_mini
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "your-encryption-key"
ota:
password: "your-ota-password"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "your-sensor-hotspot"
password: "your-password"
captive_portal:
uart:
id: uart_bus
tx_pin:
number: GPIO1
rx_pin:
number: GPIO3
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2450:
uart_id: uart_bus
update_interval: 1s
invert_y: false
invert_x: false
binary_sensor:
- platform: ld2450
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
presence_regions:
- name: "Custom Presence Region 0"
region_id: presence_region_0
text_sensor:
- platform: ld2450
version:
name: "FW"
mac_address:
name: "MAC address"
button:
- platform: restart
name: "ESP Restart"
- platform: ld2450
factory_reset:
name: "Factory reset"
reboot:
name: "Reboot"
switch:
- platform: ld2450
single_target:
name: "Single target"
bluetooth:
name: "Bluetooth"
number:
- platform: ld2450
rotate:
restore_value: true
initial_value: 0
name: "Rotate angle"
presence_timeout:
name: "Presence timeout"
presence_regions:
- x0: 100
y0: 100
x1: 200
y1: 200
id: presence_region_0
entry_points:
- x: 0
y: 0
region_0:
x0:
name: R0X0
y0:
name: R0Y0
x1:
name: R0X1
y1:
name: R0Y1
region_1:
x0:
name: R1X0
y0:
name: R1Y0
x1:
name: R1X1
y1:
name: R1Y1
region_2:
x0:
name: R2X0
y0:
name: R2Y0
x1:
name: R2X1
y1:
name: R2Y1
select:
- platform: ld2450
baud_rate:
name: "Baud rate"
regions_type:
name: "Regions type"
sensor:
- platform: ld2450
target_count:
name: Target count
person_0:
position_x:
name: "P0X"
position_y:
name: "P0Y"
speed:
name: "S0"
resolution:
name: "R0"
person_1:
position_x:
name: "P1X"
position_y:
name: "P1Y"
speed:
name: "S1"
resolution:
name: "R1"
person_2:
position_x:
name: "P2X"
position_y:
name: "P2Y"
speed:
name: "S2"
resolution:
name: "R2"