1 | external_components: |
2 | - source: github://pr#4847 |
3 | components: [ ld2420 ] |
4 | refresh: 0s |
5 | |
6 | esphome: |
7 | name: "mmwave01" |
8 | friendly_name: "mmwave01" |
9 | |
10 | esp32: |
11 | board: esp32dev |
12 | framework: |
13 | type: arduino |
14 | |
15 | # Enable logging |
16 | logger: |
17 | |
18 | # Enable Home Assistant API |
19 | api: |
20 | encryption: |
21 | key: "chave" |
22 | |
23 | ota: |
24 | password: "senha" |
25 | |
26 | wifi: |
27 | ssid: !secret wifi_ssid |
28 | password: !secret wifi_password |
29 | |
30 | # Enable fallback hotspot (captive portal) in case wifi connection fails |
31 | ap: |
32 | ssid: "Teste Fallback Hotspot" |
33 | password: "senha" |
34 | |
35 | captive_portal: |
36 | |
37 | esp32_ble_tracker: |
38 | |
39 | uart: |
40 | id: ld2420_uart |
41 | tx_pin: 22 |
42 | rx_pin: 19 |
43 | baud_rate: 115200 |
44 | parity: NONE |
45 | stop_bits: 1 |
46 | |
47 | # The LD2420 has 16 sense gates 0-15 and each gate detects 0.7 meters 15th gate = 9m |
48 | ld2420: |
49 | |
50 | text_sensor: |
51 | - platform: ld2420 |
52 | fw_version: |
53 | name: LD2420 Firmware |
54 | |
55 | sensor: |
56 | - platform: ld2420 |
57 | moving_distance: |
58 | name : Moving Distance |
59 | |
60 | switch: |
61 | - platform: restart |
62 | name: Restart |
63 | |
64 | select: |
65 | - platform: ld2420 |
66 | operating_mode: |
67 | name: (s) Operating Mode |
68 | |
69 | number: |
70 | - platform: ld2420 |
71 | presence_timeout: |
72 | name: (n) Detection Presence Timeout |
73 | min_gate_distance: |
74 | name: (n) Detection Gate Minimum |
75 | max_gate_distance: |
76 | name: (n) Detection Gate Maximum |
77 | gate_select: |
78 | name: (n) Select Gate to Set |
79 | still_threshold: |
80 | name: (n) Set Still Threshold Value |
81 | move_threshold: |
82 | name: (n) Set Move Threshold Value |
83 | |
84 | button: |
85 | - platform: ld2420 |
86 | apply_config: |
87 | name: (b) Apply Config |
88 | factory_reset: |
89 | name: (b) Factory Reset |
90 | restart_module: |
91 | name: (b) Restart Module |
92 | revert_config: |
93 | name: (b) Undo Edits |
94 | |
95 | binary_sensor: |
96 | - platform: ld2420 |
97 | has_target: |
98 | name: Presence |
99 | - platform: gpio |
100 | pin: |
101 | number: 26 |
102 | mode: INPUT_PULLUP |
103 | name: "Interruptor mmwave" |
104 | device_class: light |
105 | #on_press: |
106 | # - homeassistant.service: |
107 | # service: light.turn_off |
108 | # data: |
109 | # entity_id: light.escritorio_mesa |
110 | #on_release: |
111 | # - homeassistant.service: |
112 | # service: light.turn_on |
113 | # data: |
114 | # entity_id: light.escritorio_mesa |
115 | - platform: gpio |
116 | pin: |
117 | number: 39 |
118 | inverted: false |
119 | name: Botão |
120 | on_press: |
121 | then: |
122 | - light.toggle: status_led |
123 | |
124 | light: |
125 | - platform: fastled_clockless |
126 | chipset: WS2812B |
127 | pin: 27 |
128 | num_leds: 1 |
129 | rgb_order: GRB |
130 | id: status_led |
131 | name: Luz |
132 | effects: |
133 | - random: |
134 | - flicker: |
135 | - addressable_rainbow: |