mirror of
https://github.com/esphome/esphome.git
synced 2026-10-19 12:42:50 +00:00
[ld2410] Warn when a threshold number matches no gate
This commit is contained in:
@@ -733,8 +733,10 @@ void LD2410Component::set_gate_threshold(number::Number *n) {
|
||||
while (gate < TOTAL_GATES && this->gate_move_threshold_numbers_[gate] != n &&
|
||||
this->gate_still_threshold_numbers_[gate] != n)
|
||||
gate++;
|
||||
if (gate == TOTAL_GATES)
|
||||
if (gate == TOTAL_GATES) {
|
||||
ESP_LOGW(TAG, "Threshold number is not a known gate");
|
||||
return;
|
||||
}
|
||||
number::Number *motionsens = this->gate_move_threshold_numbers_[gate];
|
||||
number::Number *stillsens = this->gate_still_threshold_numbers_[gate];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user