41#ifdef USE_BINARY_SENSOR
42 SUB_BINARY_SENSOR(out_pin_presence_status)
43 SUB_BINARY_SENSOR(moving_target)
44 SUB_BINARY_SENSOR(still_target)
45 SUB_BINARY_SENSOR(target)
48 SUB_SENSOR_WITH_DEDUP(light, uint8_t)
49 SUB_SENSOR_WITH_DEDUP(detection_distance,
int)
50 SUB_SENSOR_WITH_DEDUP(moving_target_distance,
int)
51 SUB_SENSOR_WITH_DEDUP(moving_target_energy, uint8_t)
52 SUB_SENSOR_WITH_DEDUP(still_target_distance,
int)
53 SUB_SENSOR_WITH_DEDUP(still_target_energy, uint8_t)
56 SUB_TEXT_SENSOR(version)
60 SUB_NUMBER(light_threshold)
61 SUB_NUMBER(max_move_distance_gate)
62 SUB_NUMBER(max_still_distance_gate)
67 SUB_SELECT(distance_resolution)
68 SUB_SELECT(light_function)
69 SUB_SELECT(out_pin_level)
73 SUB_SWITCH(engineering_mode)
76 SUB_BUTTON(factory_reset)
82 void setup()
override;
83 void dump_config()
override;
85 void set_light_out_control();
87 void set_gate_still_threshold_number(uint8_t gate,
number::Number *n);
88 void set_gate_move_threshold_number(uint8_t gate,
number::Number *n);
89 void set_max_distances_timeout();
90 void set_gate_threshold(uint8_t gate);
96 void set_bluetooth_password(
const std::string &password);
97 void set_engineering_mode(
bool enable);
99 void restart_and_read_all_info();
100 void set_bluetooth(
bool enable);
101 void set_distance_resolution(
const std::string &
state);
102 void set_baud_rate(
const std::string &
state);
103 void factory_reset();
106 void send_command_(uint8_t command_str,
const uint8_t *command_value, uint8_t command_value_len);