80#ifdef USE_BINARY_SENSOR
81 SUB_BINARY_SENSOR(moving_target)
82 SUB_BINARY_SENSOR(still_target)
83 SUB_BINARY_SENSOR(target)
86 SUB_SENSOR_WITH_DEDUP(moving_target_count, uint8_t)
87 SUB_SENSOR_WITH_DEDUP(still_target_count, uint8_t)
88 SUB_SENSOR_WITH_DEDUP(target_count, uint8_t)
92 SUB_TEXT_SENSOR(version)
95 SUB_NUMBER(presence_timeout)
102 SUB_SWITCH(bluetooth)
103 SUB_SWITCH(multi_target)
106 SUB_BUTTON(factory_reset)
111 void setup()
override;
112 void dump_config()
override;
113 void loop()
override;
114 void set_presence_timeout();
115 void read_all_info();
116 void query_zone_info();
117 void restart_and_read_all_info();
118 void set_bluetooth(
bool enable);
119 void set_multi_target(
bool enable);
120 void set_baud_rate(
const char *
state);
121 void set_zone_type(
const char *
state);
122 void publish_zone_type();
123 void factory_reset();
124#ifdef USE_TEXT_SENSOR
128 void set_zone_coordinate(uint8_t zone);
137 void set_move_resolution_sensor(uint8_t target,
sensor::Sensor *s);
138 void set_zone_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
139 void set_zone_still_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
140 void set_zone_moving_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
142 void reset_radar_zone();
143 void set_radar_zone(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
144 int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
145 int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
148 void add_on_data_callback(std::function<
void()> &&callback);
151 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
196#ifdef USE_TEXT_SENSOR