41#ifdef USE_BINARY_SENSOR
42 SUB_BINARY_SENSOR(dynamic_background_correction_status)
43 SUB_BINARY_SENSOR(moving_target)
44 SUB_BINARY_SENSOR(still_target)
45 SUB_BINARY_SENSOR(target)
48 SUB_SENSOR_WITH_DEDUP(light, uint8_t)
49 SUB_SENSOR_WITH_DEDUP(detection_distance,
int)
50 SUB_SENSOR_WITH_DEDUP(moving_target_distance,
int)
51 SUB_SENSOR_WITH_DEDUP(moving_target_energy, uint8_t)
52 SUB_SENSOR_WITH_DEDUP(still_target_distance,
int)
53 SUB_SENSOR_WITH_DEDUP(still_target_energy, uint8_t)
57 SUB_TEXT_SENSOR(version)
60 SUB_NUMBER(light_threshold)
61 SUB_NUMBER(max_distance_gate)
62 SUB_NUMBER(min_distance_gate)
67 SUB_SELECT(distance_resolution)
68 SUB_SELECT(light_function)
69 SUB_SELECT(out_pin_level)
73 SUB_SWITCH(engineering_mode)
76 SUB_BUTTON(factory_reset)
79 SUB_BUTTON(start_dynamic_background_correction)
83 void setup()
override;
84 void dump_config()
override;
86 void set_light_out_control();
87 void set_basic_config();
89 void set_gate_move_threshold_number(uint8_t gate,
number::Number *n);
90 void set_gate_still_threshold_number(uint8_t gate,
number::Number *n);
91 void set_gate_threshold();
92 void get_gate_threshold();
98 void set_engineering_mode(
bool enable);
100 void restart_and_read_all_info();
101 void set_bluetooth(
bool enable);
102 void set_distance_resolution(
const std::string &
state);
103 void set_baud_rate(
const std::string &
state);
104 void factory_reset();
105 void start_dynamic_background_correction();
108 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);