83#ifdef USE_BINARY_SENSOR
84 SUB_BINARY_SENSOR(moving_target)
85 SUB_BINARY_SENSOR(still_target)
86 SUB_BINARY_SENSOR(target)
89 SUB_SENSOR_WITH_DEDUP(moving_target_count, uint8_t)
90 SUB_SENSOR_WITH_DEDUP(still_target_count, uint8_t)
91 SUB_SENSOR_WITH_DEDUP(target_count, uint8_t)
95 SUB_TEXT_SENSOR(version)
98 SUB_NUMBER(presence_timeout)
101 SUB_SELECT(baud_rate)
102 SUB_SELECT(zone_type)
105 SUB_SWITCH(bluetooth)
106 SUB_SWITCH(multi_target)
109 SUB_BUTTON(factory_reset)
114 void setup()
override;
115 void dump_config()
override;
116 void loop()
override;
117 void set_presence_timeout();
118 void read_all_info();
119 void query_zone_info();
120 void restart_and_read_all_info();
121 void set_bluetooth(
bool enable);
122 void set_multi_target(
bool enable);
123 void set_baud_rate(
const char *
state);
124 void set_zone_type(
const char *
state);
125 void publish_zone_type();
126 void factory_reset();
127#ifdef USE_TEXT_SENSOR
140 void set_move_resolution_sensor(uint8_t target,
sensor::Sensor *s);
141 void set_zone_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
142 void set_zone_still_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
143 void set_zone_moving_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
145#ifdef LD2450_POLYGON_ZONE_COUNT
148 void reset_radar_zone();
149 void set_radar_zone(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
150 int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
151 int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
154 template<
typename F>
void add_on_data_callback(F &&callback) { this->
data_callback_.add(std::forward<F>(callback)); }
157 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
186#ifdef USE_TEXT_SENSOR
206#ifdef USE_TEXT_SENSOR
210#ifdef LD2450_POLYGON_ZONE_COUNT