5static const char *
const TAG =
"ld2420.number";
11 this->
parent_->new_config.timeout = timeout;
15 if ((uint16_t) min_gate > this->
parent_->new_config.max_gate) {
16 min_gate = this->
parent_->get_min_gate_distance_value();
18 this->
parent_->new_config.min_gate = (uint16_t) min_gate;
24 if ((uint16_t) max_gate < this->
parent_->new_config.min_gate) {
25 max_gate = this->
parent_->get_max_gate_distance_value();
27 this->
parent_->new_config.max_gate = (uint16_t) max_gate;
33 const uint8_t gate = (uint8_t) gate_select;
35 this->
parent_->publish_gate_move_threshold(gate);
36 this->
parent_->publish_gate_still_threshold(gate);
41 this->
parent_->gate_move_sensitivity_factor = move_factor;
46 this->
parent_->gate_still_sensitivity_factor = still_factor;
53 if (!this->
parent_->is_gate_select()) {
54 this->
parent_->new_config.move_thresh[this->
gate_] = move_threshold;
56 this->
parent_->new_config.move_thresh[this->
parent_->get_gate_select_value()] = move_threshold;
64 if (!this->
parent_->is_gate_select()) {
65 this->
parent_->new_config.still_thresh[this->
gate_] = still_threshold;
67 this->
parent_->new_config.still_thresh[this->
parent_->get_gate_select_value()] = still_threshold;
LD2420Component * parent_
void control(float gate_select) override
void control(float max_gate) override
void control(float min_gate) override
void control(float move_factor) override
LD2420MoveThresholdNumbers()=default
void control(float move_threshold) override
void control(float still_factor) override
LD2420StillThresholdNumbers()=default
void control(float still_threshold) override
void control(float timeout) override
void publish_state(float state)