114 SUB_SENSOR(target_count)
115 SUB_SENSOR(still_target_count)
116 SUB_SENSOR(moving_target_count)
118#ifdef USE_BINARY_SENSOR
119 SUB_BINARY_SENSOR(target)
120 SUB_BINARY_SENSOR(moving_target)
121 SUB_BINARY_SENSOR(still_target)
123#ifdef USE_TEXT_SENSOR
124 SUB_TEXT_SENSOR(version)
128 SUB_SELECT(baud_rate)
129 SUB_SELECT(zone_type)
132 SUB_SWITCH(bluetooth)
133 SUB_SWITCH(multi_target)
140 SUB_NUMBER(presence_timeout)
145 void setup()
override;
146 void dump_config()
override;
147 void loop()
override;
148 void set_presence_timeout();
149 void set_throttle(uint16_t value) { this->
throttle_ = value; };
150 void read_all_info();
151 void query_zone_info();
152 void restart_and_read_all_info();
153 void set_bluetooth(
bool enable);
154 void set_multi_target(
bool enable);
155 void set_baud_rate(
const std::string &
state);
156 void set_zone_type(
const std::string &
state);
157 void publish_zone_type();
158 void factory_reset();
159#ifdef USE_TEXT_SENSOR
163 void set_zone_coordinate(uint8_t zone);
172 void set_move_resolution_sensor(uint8_t target,
sensor::Sensor *s);
173 void set_zone_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
174 void set_zone_still_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
175 void set_zone_moving_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
177 void reset_radar_zone();
178 void set_radar_zone(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
179 int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
180 int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
183 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
188 void readline_(
int readch, uint8_t *buffer, uint8_t
len);
218 std::vector<sensor::Sensor *>
move_x_sensors_ = std::vector<sensor::Sensor *>(MAX_TARGETS);
219 std::vector<sensor::Sensor *>
move_y_sensors_ = std::vector<sensor::Sensor *>(MAX_TARGETS);
228#ifdef USE_TEXT_SENSOR