Após atualizar a Versão do ESPHOME para essa ultima versão, minha configuração do Sensor LD2420 começou a apresentar erro na validação da configuração. O que está impedindo futuros updates.
Poderiam me ajudar.
MInha configuração.
“”
Código usado no LD2420
Erro reportado
ld2420: [source /config/esphome/hlk-ld2420-b.yaml:57]
[presence_time_window] is an invalid option for [0]. Please check the indentation.
presence_time_window: 20s
[detection_gate_min] is an invalid option for [0]. Please check the indentation.
detection_gate_min: 1
Erro de indentação - já tentei o update automatico e não deu certo.
O que pode estar errado ?
Walber
Novembro 8, 2023, 1:30pm
#2
Acho que vc vai precisar atualizar o código.
esphome:dev
← descipher:component.ld2420
opened 02:53AM - 17 May 23 UTC
# What does this implement/fix?
Adds the HLK-LD2420 mmWave Radar module compo… nent.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#2956
Related issue or feature (if applicable): https://github.com/esphome/feature-requests/issues/2219
## Test Environment
- [x] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
## Example entry for `config.yaml`:
```yaml
external_components:
- source: github://pr#4847
components: [ ld2420 ]
refresh: 0s
esphome:
name: presence-1
friendly_name: presence-1
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "<your.api.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: presense-1
password: !secret captive_password
captive_portal:
web_server:
port: 80
uart:
id: ld2420_uart
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
parity: NONE
stop_bits: 1
# The LD2420 has 16 sense gates 0-15 and each gate detects 0.7 meters 15th gate = 9m
ld2420:
text_sensor:
- platform: ld2420
fw_version:
name: LD2420 Firmware
sensor:
- platform: ld2420
moving_distance:
name : Moving Distance
binary_sensor:
- platform: ld2420
has_target:
name: Presence
switch:
- platform: restart
name: Restart ESPHome Node
select:
- platform: ld2420
operating_mode:
name: Operating Mode
number:
- platform: ld2420
presence_timeout:
name: Detection Presence Timeout
min_gate_distance:
name: Detection Gate Minimum
max_gate_distance:
name: Detection Gate Maximum
# gate_select:
# name: Select Gate to Set
# still_threshold:
# name: Set Still Threshold Value
# move_threshold:
# name: Set Move Threshold Value
gate_move_sensitivity:
name: Move Calibration Sensitivity Factor
gate_still_sensitivity:
name: Still Calibration Sensitivity Factor
gate_0:
move_threshold:
name: Gate 0 Move Threshold
still_threshold:
name: Gate 0 Still Threshold
gate_1:
move_threshold:
name: Gate 1 Move Threshold
still_threshold:
name: Gate 1 Still Threshold
gate_2:
move_threshold:
name: Gate 2 Move Threshold
still_threshold:
name: Gate 2 Still Threshold
gate_3:
move_threshold:
name: Gate 3 Move Threshold
still_threshold:
name: Gate 3 Still Threshold
gate_4:
move_threshold:
name: Gate 4 Move Threshold
still_threshold:
name: Gate 4 Still Threshold
gate_5:
move_threshold:
name: Gate 5 Move Threshold
still_threshold:
name: Gate 5 Still Threshold
gate_6:
move_threshold:
name: Gate 6 Move Threshold
still_threshold:
name: Gate 6 Still Threshold
gate_7:
move_threshold:
name: Gate 7 Move Threshold
still_threshold:
name: Gate 7 Still Threshold
gate_8:
move_threshold:
name: Gate 8 Move Threshold
still_threshold:
name: Gate 8 Still Threshold
gate_9:
move_threshold:
name: Gate 9 Move Threshold
still_threshold:
name: Gate 9 Still Threshold
gate_10:
move_threshold:
name: Gate 10 Move Threshold
still_threshold:
name: Gate 10 Still Threshold
gate_11:
move_threshold:
name: Gate 11 Move Threshold
still_threshold:
name: Gate 11 Still Threshold
gate_12:
move_threshold:
name: Gate 12 Move Threshold
still_threshold:
name: Gate 12 Still Threshold
gate_13:
move_threshold:
name: Gate 13 Move Threshold
still_threshold:
name: Gate 13 Still Threshold
gate_14:
move_threshold:
name: Gate 14 Move Threshold
still_threshold:
name: Gate 14 Still Threshold
gate_15:
move_threshold:
name: Gate 15 Move Threshold
still_threshold:
name: Gate 15 Still Threshold
button:
- platform: ld2420
apply_config:
name: Apply Config
factory_reset:
name: Factory Reset
restart_module:
name: Restart Module
revert_config:
name: Undo Edits
```
## Checklist:
- [x] The code change is tested and works locally.
- [x] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).