62#ifdef USE_BINARY_SENSOR
63 SUB_BINARY_SENSOR(dynamic_background_correction_status)
64 SUB_BINARY_SENSOR(moving_target)
65 SUB_BINARY_SENSOR(still_target)
66 SUB_BINARY_SENSOR(target)
69 SUB_SENSOR_WITH_DEDUP(light, uint8_t)
70 SUB_SENSOR_WITH_DEDUP(detection_distance,
int)
71 SUB_SENSOR_WITH_DEDUP(moving_target_distance,
int)
72 SUB_SENSOR_WITH_DEDUP(moving_target_energy, uint8_t)
73 SUB_SENSOR_WITH_DEDUP(still_target_distance,
int)
74 SUB_SENSOR_WITH_DEDUP(still_target_energy, uint8_t)
78 SUB_TEXT_SENSOR(version)
81 SUB_NUMBER(light_threshold)
82 SUB_NUMBER(max_distance_gate)
83 SUB_NUMBER(min_distance_gate)
88 SUB_SELECT(distance_resolution)
89 SUB_SELECT(light_function)
90 SUB_SELECT(out_pin_level)
94 SUB_SWITCH(engineering_mode)
97 SUB_BUTTON(factory_reset)
100 SUB_BUTTON(start_dynamic_background_correction)
104 void setup()
override;
105 void dump_config()
override;
106 void loop()
override;
107 void set_light_out_control();
108 void set_basic_config();
110 void set_gate_move_threshold_number(uint8_t gate,
number::Number *n) {
113 void set_gate_still_threshold_number(uint8_t gate,
number::Number *n) {
117 void get_gate_threshold();
123 void set_engineering_mode(
bool enable);
124 void read_all_info();
125 void restart_and_read_all_info();
126 void set_bluetooth(
bool enable);
127 void set_distance_resolution(
const char *
state);
129 void set_baud_rate(
const char *
state);
131 void factory_reset();
132 void start_dynamic_background_correction();
135 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
152 std::array<number::Number *, TOTAL_GATES>
numbers{};