79#ifdef USE_BINARY_SENSOR
80 SUB_BINARY_SENSOR(moving_target)
81 SUB_BINARY_SENSOR(still_target)
82 SUB_BINARY_SENSOR(target)
85 SUB_SENSOR_WITH_DEDUP(moving_target_count, uint8_t)
86 SUB_SENSOR_WITH_DEDUP(still_target_count, uint8_t)
87 SUB_SENSOR_WITH_DEDUP(target_count, uint8_t)
91 SUB_TEXT_SENSOR(version)
94 SUB_NUMBER(presence_timeout)
101 SUB_SWITCH(bluetooth)
102 SUB_SWITCH(multi_target)
105 SUB_BUTTON(factory_reset)
110 void setup()
override;
111 void dump_config()
override;
112 void loop()
override;
113 void set_presence_timeout();
114 void read_all_info();
115 void query_zone_info();
116 void restart_and_read_all_info();
117 void set_bluetooth(
bool enable);
118 void set_multi_target(
bool enable);
119 void set_baud_rate(
const char *
state);
120 void set_zone_type(
const char *
state);
121 void publish_zone_type();
122 void factory_reset();
123#ifdef USE_TEXT_SENSOR
127 void set_zone_coordinate(uint8_t zone);
136 void set_move_resolution_sensor(uint8_t target,
sensor::Sensor *s);
137 void set_zone_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
138 void set_zone_still_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
139 void set_zone_moving_target_count_sensor(uint8_t zone,
sensor::Sensor *s);
141 void reset_radar_zone();
142 void set_radar_zone(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
143 int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
144 int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
147 template<
typename F>
void add_on_data_callback(F &&callback) { this->
data_callback_.add(std::forward<F>(callback)); }
150 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);
195#ifdef USE_TEXT_SENSOR