111#ifdef USE_BINARY_SENSOR
112 SUB_BINARY_SENSOR(connected)
113 SUB_BINARY_SENSOR(moving_target)
114 SUB_BINARY_SENSOR(still_target)
115 SUB_BINARY_SENSOR(target)
118 SUB_SENSOR_WITH_DEDUP(moving_target_count, uint8_t)
119 SUB_SENSOR_WITH_DEDUP(still_target_count, uint8_t)
120 SUB_SENSOR_WITH_DEDUP(target_count, uint8_t)
122#ifdef USE_TEXT_SENSOR
124 SUB_TEXT_SENSOR(version)
127 SUB_NUMBER(presence_timeout)
130 SUB_SELECT(baud_rate)
131 SUB_SELECT(zone_type)
134 SUB_SWITCH(bluetooth)
135 SUB_SWITCH(multi_target)
138 SUB_BUTTON(factory_reset)
143 void setup()
override;
144 void dump_config()
override;
145 void loop()
override;
146 void set_presence_timeout();
148 void read_all_info();
149 void query_zone_info();
150 void restart_and_read_all_info();
151 void set_bluetooth(
bool enable);
152 void set_multi_target(
bool enable);
153 void set_baud_rate(
const char *
state);
155 void set_zone_type(
const char *
state);
157 void publish_zone_type();
158 void factory_reset();
159#ifdef USE_TEXT_SENSOR
162#ifdef USE_LD2450_TARGET_XY
175 void set_move_resolution_sensor(uint8_t target,
sensor::Sensor *s);
176 void set_zone_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
177 void set_zone_still_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
178 void set_zone_moving_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
180#ifdef LD2450_POLYGON_ZONE_COUNT
183 void reset_radar_zone();
184 void set_radar_zone(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
185 int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
186 int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
189 template<
typename F>
void add_on_data_callback(F &&callback) { this->
data_callback_.add(std::forward<F>(callback)); }
192 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
216#ifdef USE_LD2450_TARGET_XY
239#ifdef USE_TEXT_SENSOR
259#ifdef USE_TEXT_SENSOR
262#ifdef USE_LD2450_TARGET_XY
267#ifdef LD2450_POLYGON_ZONE_COUNT