ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::ld600x::LD600XComponent Class Reference

#include <ld600x.h>

Inheritance diagram for esphome::ld600x::LD600XComponent:
esphome::Component esphome::uart::UARTDevice esphome::ld6002b::LD6002BComponent esphome::ld6004::LD6004Component

Data Structures

struct  PendingCommand
 

Public Member Functions

 LD600XComponent (const LogString *log_tag)
 
void setup () override
 
void loop () override
 
void dump_config () override
 
 SUB_SENSOR_WITH_DEDUP (target_count, uint32_t) SUB_SENSOR_WITH_DEDUP(point_count
 
uint32_t void set_target_x_sensor (uint8_t target, sensor::Sensor *sensor)
 
void set_target_y_sensor (uint8_t target, sensor::Sensor *sensor)
 
void set_target_z_sensor (uint8_t target, sensor::Sensor *sensor)
 
void set_target_dop_idx_sensor (uint8_t target, sensor::Sensor *sensor)
 
void set_target_cluster_id_sensor (uint8_t target, sensor::Sensor *sensor)
 
void set_area_sensor (uint8_t kind, uint8_t area, uint8_t axis, sensor::Sensor *sensor)
 
 SUB_BINARY_SENSOR (presence) void set_target_presence_binary_sensor(uint8_t target
 
void set_area_presence_binary_sensor (uint8_t area, binary_sensor::BinarySensor *sensor)
 
virtual SUB_TEXT_SENSOR(work_mode) SUB_TEXT_SENSOR(ota_version) SUB_NUMBER(hold_delay) SUB_NUMBER(z_min) SUB_NUMBER(z_max) SUB_NUMBER(low_power_sleep) SUB_NUMBER(area_x_min) SUB_NUMBER(area_x_max) SUB_NUMBER(area_y_min) SUB_NUMBER(area_y_max) SUB_NUMBER(area_z_min) SUB_NUMBER(area_z_max) SUB_SELECT(sensitivity) SUB_SELECT(trigger_speed) SUB_SELECT(installation) SUB_SELECT(area_id) SUB_SWITCH(point_cloud) SUB_SWITCH(target_display) virtual bool set_number_value(number bool set_select_value (select::Select *entity, size_t index)
 
virtual bool set_switch_state (switch_::Switch *entity, bool state)
 
virtual void press_button (uint8_t kind)
 
- Public Member Functions inherited from esphome::Component
virtual float get_setup_priority () const
 priority of setup().
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
virtual bool teardown ()
 Called during teardown to allow component to gracefully finish operations.
 
virtual void on_powerdown ()
 Called last before a reboot or deep sleep to power down hardware.
 
uint8_t get_component_state () const
 
void reset_to_construction_state ()
 Reset this component back to the construction state to allow setup to run again.
 
bool is_in_loop_state () const
 Check if this component has completed setup and is in the loop state.
 
bool is_idle () const
 Check if this component is idle.
 
void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const LogString *message)
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok)
 Marks the component failed with message (default "Communication failed") unless ok; returns ok.
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok, const LogString *message)
 
void disable_loop ()
 Disable this component's loop.
 
void enable_loop ()
 Enable this component's loop.
 
void enable_loop_soon_any_context ()
 Thread and ISR-safe version of enable_loop() that can be called from any context.
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning ()
 
void status_set_warning (const char *message)
 
void status_set_warning (const LogString *message)
 
bool status_comm_result (bool ok)
 Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
 
bool status_comm_result (bool ok, const LogString *message)
 
void status_set_error ()
 
void status_set_error (const LogString *message)
 
void status_clear_warning ()
 
void status_clear_error ()
 
 ESPDEPRECATED ("Use status_momentary_warning() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_warning(const char *name
 
void status_momentary_warning (uint32_t length=5000)
 Set warning status flag and clear it after length ms.
 
void status_momentary_warning (const LogString *message, uint32_t length=5000)
 
 ESPDEPRECATED ("Use status_momentary_error() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_error(const char *name
 
void status_momentary_error (uint32_t length=5000)
 Set error status flag and clear it after length ms.
 
void status_momentary_error (const LogString *message, uint32_t length=5000)
 
bool has_overridden_loop () const
 
const LogString * get_component_log_str () const ESPHOME_ALWAYS_INLINE
 Get the integration where this component was declared as a LogString for logging.
 
bool should_warn_of_blocking (uint32_t blocking_time, uint32_t &threshold_ms_out)
 
- Public Member Functions inherited from esphome::uart::UARTDevice
 UARTDevice ()=default
 
 UARTDevice (UARTComponent *parent)
 
void set_uart_parent (UARTComponent *parent)
 
void write_byte (uint8_t data)
 
void set_rx_full_threshold (size_t rx_full_threshold)
 
void set_rx_full_threshold_ms (size_t time)
 
size_t get_rx_full_threshold ()
 
void set_rx_timeout (size_t rx_timeout)
 
size_t get_rx_timeout ()
 
void write_array (const uint8_t *data, size_t len)
 
void write_array_progmem (const uint8_t *data, size_t len)
 
void write_array (const std::vector< uint8_t > &data)
 
template<size_t N>
void write_array (const std::array< uint8_t, N > &data)
 
void write_str (const char *str)
 
bool read_byte (uint8_t *data)
 
bool peek_byte (uint8_t *data)
 
bool read_array (uint8_t *data, size_t len)
 
template<size_t N>
optional< std::array< uint8_t, N > > read_array ()
 
size_t available ()
 
template<size_t N = 64, typename F >
bool read_available_chunks (F &&on_chunk)
 Pass the bytes available now to on_chunk(data, len) in N byte chunks; returning false stops.
 
template<size_t N = 64, typename F >
bool read_available_chunks (F &&on_chunk, size_t count)
 Same, reading exactly count bytes; count must not exceed available().
 
template<size_t N = 64, typename F >
bool read_available (F &&on_byte)
 Same as read_available_chunks(), calling on_byte(uint8_t) once per byte.
 
template<size_t N = 64, typename F >
bool read_available (F &&on_byte, size_t count)
 
void discard_available ()
 Read and drop every byte waiting in the receive buffer.
 
UARTFlushResult flush ()
 
int read ()
 
size_t write (uint8_t data)
 
int peek ()
 
 ESPDEPRECATED ("Use uart.final_validate_device_schema() in Python instead. Removed in 2027.3.0", "2026.9.0") void check_uart_settings(uint32_t baud_rate
 Check that the configuration of the UART bus matches the provided values and otherwise print a warning.
 

Data Fields

binary_sensor::BinarySensor * sensor
 
this target_presence_ [target] = sensor
 
- Data Fields inherited from esphome::Component
uint32_t length = 5000)
 
- Data Fields inherited from esphome::uart::UARTDevice
uint8_t stop_bits = 1
 
uint8_t UARTParityOptions parity = UART_CONFIG_PARITY_NONE
 
uint8_t UARTParityOptions uint8_t data_bits = 8)
 

Protected Member Functions

virtual bool handle_model_report (uint16_t type, const uint8_t *data, uint16_t len)
 
virtual bool model_wants_target_stream () const
 
virtual void on_presence_update ()
 
virtual bool defer_frame_write (uint16_t type, const uint8_t *data, uint8_t len, bool track)
 
virtual void setup_model ()
 
virtual void dump_model_config ()
 
void handle_frame_ (uint16_t type, const uint8_t *data, uint16_t len)
 
void handle_target_report_ (const uint8_t *data, uint16_t len)
 
void handle_point_cloud_ (const uint8_t *data, uint16_t len)
 
void handle_area_presence_ (const uint8_t *data, uint16_t len)
 
void handle_area_report_ (uint8_t kind, const uint8_t *data, uint16_t len)
 
void handle_delay_report_ (const uint8_t *data, uint16_t len)
 
void handle_sensitivity_report_ (const uint8_t *data, uint16_t len)
 
void handle_trigger_speed_report_ (const uint8_t *data, uint16_t len)
 
void handle_z_range_report_ (const uint8_t *data, uint16_t len)
 
void handle_installation_report_ (const uint8_t *data, uint16_t len)
 
void handle_low_power_sleep_report_ (const uint8_t *data, uint16_t len)
 
void handle_version_report_ (const uint8_t *data, uint16_t len)
 
void clear_target_state_ ()
 
void clear_area_presence_ ()
 
void restore_deferred_edits_ ()
 
void publish_area_numbers_ ()
 
void clear_target_slot_ (uint8_t index)
 
void publish_number_clamped_ (number::Number *number, float value)
 
void update_area_numbers_ (const AreaConfig &area)
 
void update_area_numbers_for_id_ (uint8_t area_id)
 
bool queue_area_config_ (uint8_t area_id, const AreaConfig &desired)
 
void try_apply_pending_area_ (uint8_t reported_kind)
 
void init_area_id_pref_ ()
 
void save_area_id_pref_ (uint8_t value)
 
void init_version_pref_ ()
 
void save_version_pref_ (const char *value)
 
bool queue_command_ (uint16_t type, const uint8_t *data, uint8_t len)
 
void process_command_queue_ ()
 
void send_command_ (uint16_t type, const uint8_t *data, uint8_t len)
 
void send_command_internal_ (uint16_t type, const uint8_t *data, uint8_t len, bool track)
 
void write_frame_ (uint16_t type, const uint8_t *data, uint8_t len, bool track)
 
bool send_control_command_ (uint32_t command)
 
bool send_z_range_ (float z_min, float z_max)
 
bool queue_u32_setting_ (uint16_t type, float value)
 
void apply_area_config_ ()
 
- Protected Member Functions inherited from esphome::Component
friend void::setup ()
 
friend void::original_setup ()
 
void set_component_source_ (uint8_t index)
 Set where this component was loaded from for some debug messages.
 
virtual void call_setup ()
 
void call_dump_config_ ()
 
void enable_loop_slow_path_ ()
 
void set_component_state_ (uint8_t state)
 Helper to set component state (clears state bits and sets new state)
 
bool set_status_flag_ (uint8_t flag)
 Helper to set a status LED flag on both this component and the app.
 
bool set_error_flag_ (const LogString *message)
 Set the error flag and log it; true when it was not set before.
 
void set_interval (const char *name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a const char* name.
 
void set_interval (uint32_t id, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a numeric ID (zero heap allocation).
 
void set_interval (InternalSchedulerID id, uint32_t interval, std::function< void()> &&f)
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const char *name)
 Cancel an interval function.
 
bool cancel_interval (uint32_t id)
 
bool cancel_interval (InternalSchedulerID id)
 
void set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a const char* name.
 
void set_timeout (uint32_t id, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a numeric ID (zero heap allocation).
 
void set_timeout (InternalSchedulerID id, uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const char *name)
 Cancel a timeout function.
 
bool cancel_timeout (uint32_t id)
 
bool cancel_timeout (InternalSchedulerID id)
 
void defer (const char *name, std::function< void()> &&f)
 Defer a callback to the next loop() call with a const char* name.
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
void defer (uint32_t id, std::function< void()> &&f)
 Defer a callback with a numeric ID (zero heap allocation)
 
bool cancel_defer (const char *name)
 Cancel a defer callback using the specified name, name must not be empty.
 
bool cancel_defer (uint32_t id)
 
void status_clear_warning_slow_path_ ()
 
void status_clear_error_slow_path_ ()
 

Protected Attributes

const char * log_tag_
 
std::array< TargetSensors, LD600X_MAX_TARGETS > targets_ {}
 
std::array< AreaSensors, AREA_COUNT *LD600X_AREA_KINDS > areas_ {}
 
std::array< binary_sensor::BinarySensor *, LD600X_MAX_TARGETS > target_presence_ {}
 
std::array< binary_sensor::BinarySensor *, AREA_COUNT > area_presence_ {}
 
ESPPreferenceObject version_pref_ {}
 
bool version_pref_initialized_ {false}
 
ESPPreferenceObject area_id_pref_ {}
 
bool area_id_pref_initialized_ {false}
 
FrameParser parser_
 
uint16_t next_frame_id_ {0}
 
StaticRingBuffer< PendingCommand, CMD_QUEUE_SIZE > cmd_queue_
 
bool command_active_ {false}
 
bool command_sent_ {false}
 
PendingCommand active_command_ {}
 
uint8_t retries_left_ {0}
 
uint32_t last_send_ms_ {0}
 
uint32_t last_traffic_ms_ {0}
 
uint8_t attempts_sent_ {0}
 
uint8_t acks_expected_ {0}
 
uint16_t stale_ack_type_ {0}
 
uint8_t stale_ack_count_ {0}
 
uint32_t stale_ack_ms_ {0}
 
uint8_t send_generation_ {0}
 
float z_min_ {NAN}
 
float z_max_ {NAN}
 
float area_x_min_ {NAN}
 
float area_x_max_ {NAN}
 
float area_y_min_ {NAN}
 
float area_y_max_ {NAN}
 
float area_z_min_ {NAN}
 
float area_z_max_ {NAN}
 
AreaConfig area_edits_ {}
 
std::array< AreaConfig, AREA_COUNT *LD600X_AREA_KINDS > area_values_ {}
 
uint8_t area_id_ {0xFF}
 
bool area_id_set_ {false}
 
std::array< int32_t, LD600X_MAX_TARGETS > slot_cluster_ {}
 
std::array< bool, LD600X_MAX_TARGETS > slot_occupied_ {}
 
bool target_presence_any_ {false}
 
bool target_display_enabled_ {false}
 
bool point_cloud_enabled_ {false}
 
bool area_presence_any_ {false}
 
bool area_write_in_flight_ {false}
 
bool deferred_apply_pending_ {false}
 
uint8_t pending_area_id_ {0xFF}
 
AreaConfig pending_area_updates_ {}
 
std::array< bool, LD600X_MAX_TARGETS > last_target_presence_ {}
 
- Protected Attributes inherited from esphome::Component
uint8_t component_source_index_ {0}
 Index into component source PROGMEM lookup table (0 = not set)
 
uint8_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_CS}
 Warn threshold in centiseconds (max 2550ms)
 
uint8_t component_state_ {0x00}
 State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bit 5: Has overridden loop() (set at registration time) Bits 6-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
ComponentRuntimeStats runtime_stats_
 
- Protected Attributes inherited from esphome::uart::UARTDevice
UARTComponent * parent_ {nullptr}
 

Static Protected Attributes

static constexpr uint8_t CMD_QUEUE_SIZE = 24
 
static constexpr uint32_t CMD_ACK_TIMEOUT_MS = 300
 
static constexpr uint32_t CMD_FIRST_ACK_TIMEOUT_MS = 600
 
static constexpr uint32_t MODULE_AWAKE_MS = 10000
 
static constexpr uint8_t CMD_MAX_RETRIES = 3
 
static constexpr uint32_t MODEL_TIMEOUT_ID = 0
 
static constexpr uint32_t AREA_REFRESH_TIMEOUT_ID = 1
 
static constexpr uint32_t STALE_ACK_MAX_AGE_MS = 1000
 

Additional Inherited Members

- Static Protected Member Functions inherited from esphome::uart::UARTDevice
template<typename F , typename... A>
static bool continue_after (F &f, A... args)
 Call f(args...) and return its result; a void callback always continues.
 

Detailed Description

Definition at line 105 of file ld600x.h.

Constructor & Destructor Documentation

◆ LD600XComponent()

esphome::ld600x::LD600XComponent::LD600XComponent ( const LogString * log_tag)
inlineexplicit

Definition at line 109 of file ld600x.h.

Member Function Documentation

◆ apply_area_config_()

void esphome::ld600x::LD600XComponent::apply_area_config_ ( )
protected

Definition at line 980 of file ld600x.cpp.

◆ clear_area_presence_()

void esphome::ld600x::LD600XComponent::clear_area_presence_ ( )
protected

Definition at line 1342 of file ld600x.cpp.

◆ clear_target_slot_()

void esphome::ld600x::LD600XComponent::clear_target_slot_ ( uint8_t index)
protected

Definition at line 1281 of file ld600x.cpp.

◆ clear_target_state_()

void esphome::ld600x::LD600XComponent::clear_target_state_ ( )
protected

Definition at line 1359 of file ld600x.cpp.

◆ defer_frame_write()

virtual bool esphome::ld600x::LD600XComponent::defer_frame_write ( uint16_t type,
const uint8_t * data,
uint8_t len,
bool track )
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent.

Definition at line 221 of file ld600x.h.

◆ dump_config()

void esphome::ld600x::LD600XComponent::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 312 of file ld600x.cpp.

◆ dump_model_config()

virtual void esphome::ld600x::LD600XComponent::dump_model_config ( )
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent, and esphome::ld6004::LD6004Component.

Definition at line 223 of file ld600x.h.

◆ handle_area_presence_()

void esphome::ld600x::LD600XComponent::handle_area_presence_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 622 of file ld600x.cpp.

◆ handle_area_report_()

void esphome::ld600x::LD600XComponent::handle_area_report_ ( uint8_t kind,
const uint8_t * data,
uint16_t len )
protected

Definition at line 644 of file ld600x.cpp.

◆ handle_delay_report_()

void esphome::ld600x::LD600XComponent::handle_delay_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 681 of file ld600x.cpp.

◆ handle_frame_()

void esphome::ld600x::LD600XComponent::handle_frame_ ( uint16_t type,
const uint8_t * data,
uint16_t len )
protected

Definition at line 414 of file ld600x.cpp.

◆ handle_installation_report_()

void esphome::ld600x::LD600XComponent::handle_installation_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 729 of file ld600x.cpp.

◆ handle_low_power_sleep_report_()

void esphome::ld600x::LD600XComponent::handle_low_power_sleep_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 742 of file ld600x.cpp.

◆ handle_model_report()

virtual bool esphome::ld600x::LD600XComponent::handle_model_report ( uint16_t type,
const uint8_t * data,
uint16_t len )
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent, and esphome::ld6004::LD6004Component.

Definition at line 214 of file ld600x.h.

◆ handle_point_cloud_()

void esphome::ld600x::LD600XComponent::handle_point_cloud_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 604 of file ld600x.cpp.

◆ handle_sensitivity_report_()

void esphome::ld600x::LD600XComponent::handle_sensitivity_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 690 of file ld600x.cpp.

◆ handle_target_report_()

void esphome::ld600x::LD600XComponent::handle_target_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 507 of file ld600x.cpp.

◆ handle_trigger_speed_report_()

void esphome::ld600x::LD600XComponent::handle_trigger_speed_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 703 of file ld600x.cpp.

◆ handle_version_report_()

void esphome::ld600x::LD600XComponent::handle_version_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 778 of file ld600x.cpp.

◆ handle_z_range_report_()

void esphome::ld600x::LD600XComponent::handle_z_range_report_ ( const uint8_t * data,
uint16_t len )
protected

Definition at line 716 of file ld600x.cpp.

◆ init_area_id_pref_()

void esphome::ld600x::LD600XComponent::init_area_id_pref_ ( )
protected

Definition at line 1221 of file ld600x.cpp.

◆ init_version_pref_()

void esphome::ld600x::LD600XComponent::init_version_pref_ ( )
protected

Definition at line 1252 of file ld600x.cpp.

◆ loop()

void esphome::ld600x::LD600XComponent::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 405 of file ld600x.cpp.

◆ model_wants_target_stream()

virtual bool esphome::ld600x::LD600XComponent::model_wants_target_stream ( ) const
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent.

Definition at line 216 of file ld600x.h.

◆ on_presence_update()

virtual void esphome::ld600x::LD600XComponent::on_presence_update ( )
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent.

Definition at line 218 of file ld600x.h.

◆ press_button()

void esphome::ld600x::LD600XComponent::press_button ( uint8_t kind)
virtual

Reimplemented in esphome::ld6002b::LD6002BComponent, and esphome::ld6004::LD6004Component.

Definition at line 1417 of file ld600x.cpp.

◆ process_command_queue_()

void esphome::ld600x::LD600XComponent::process_command_queue_ ( )
protected

Definition at line 821 of file ld600x.cpp.

◆ publish_area_numbers_()

void esphome::ld600x::LD600XComponent::publish_area_numbers_ ( )
protected

Definition at line 1116 of file ld600x.cpp.

◆ publish_number_clamped_()

void esphome::ld600x::LD600XComponent::publish_number_clamped_ ( number::Number * number,
float value )
protected

Definition at line 752 of file ld600x.cpp.

◆ queue_area_config_()

bool esphome::ld600x::LD600XComponent::queue_area_config_ ( uint8_t area_id,
const AreaConfig & desired )
protected

Definition at line 1136 of file ld600x.cpp.

◆ queue_command_()

bool esphome::ld600x::LD600XComponent::queue_command_ ( uint16_t type,
const uint8_t * data,
uint8_t len )
protected

Definition at line 799 of file ld600x.cpp.

◆ queue_u32_setting_()

bool esphome::ld600x::LD600XComponent::queue_u32_setting_ ( uint16_t type,
float value )
protected

Definition at line 967 of file ld600x.cpp.

◆ restore_deferred_edits_()

void esphome::ld600x::LD600XComponent::restore_deferred_edits_ ( )
protected

Definition at line 1295 of file ld600x.cpp.

◆ save_area_id_pref_()

void esphome::ld600x::LD600XComponent::save_area_id_pref_ ( uint8_t value)
protected

Definition at line 1243 of file ld600x.cpp.

◆ save_version_pref_()

void esphome::ld600x::LD600XComponent::save_version_pref_ ( const char * value)
protected

Definition at line 1268 of file ld600x.cpp.

◆ send_command_()

void esphome::ld600x::LD600XComponent::send_command_ ( uint16_t type,
const uint8_t * data,
uint8_t len )
protected

Definition at line 903 of file ld600x.cpp.

◆ send_command_internal_()

void esphome::ld600x::LD600XComponent::send_command_internal_ ( uint16_t type,
const uint8_t * data,
uint8_t len,
bool track )
protected

Definition at line 907 of file ld600x.cpp.

◆ send_control_command_()

bool esphome::ld600x::LD600XComponent::send_control_command_ ( uint32_t command)
protected

Definition at line 943 of file ld600x.cpp.

◆ send_z_range_()

bool esphome::ld600x::LD600XComponent::send_z_range_ ( float z_min,
float z_max )
protected

Definition at line 949 of file ld600x.cpp.

◆ set_area_presence_binary_sensor()

void esphome::ld600x::LD600XComponent::set_area_presence_binary_sensor ( uint8_t area,
binary_sensor::BinarySensor * sensor )
inline

Definition at line 157 of file ld600x.h.

◆ set_area_sensor()

void esphome::ld600x::LD600XComponent::set_area_sensor ( uint8_t kind,
uint8_t area,
uint8_t axis,
sensor::Sensor * sensor )
inline

Definition at line 144 of file ld600x.h.

◆ set_select_value()

bool esphome::ld600x::LD600XComponent::set_select_value ( select::Select * entity,
size_t index )
virtual

Reimplemented in esphome::ld6004::LD6004Component.

Definition at line 1078 of file ld600x.cpp.

◆ set_switch_state()

bool esphome::ld600x::LD600XComponent::set_switch_state ( switch_::Switch * entity,
bool state )
virtual

Definition at line 1391 of file ld600x.cpp.

◆ set_target_cluster_id_sensor()

void esphome::ld600x::LD600XComponent::set_target_cluster_id_sensor ( uint8_t target,
sensor::Sensor * sensor )
inline

Definition at line 139 of file ld600x.h.

◆ set_target_dop_idx_sensor()

void esphome::ld600x::LD600XComponent::set_target_dop_idx_sensor ( uint8_t target,
sensor::Sensor * sensor )
inline

Definition at line 134 of file ld600x.h.

◆ set_target_x_sensor()

uint32_t void esphome::ld600x::LD600XComponent::set_target_x_sensor ( uint8_t target,
sensor::Sensor * sensor )
inline

Definition at line 119 of file ld600x.h.

◆ set_target_y_sensor()

void esphome::ld600x::LD600XComponent::set_target_y_sensor ( uint8_t target,
sensor::Sensor * sensor )
inline

Definition at line 124 of file ld600x.h.

◆ set_target_z_sensor()

void esphome::ld600x::LD600XComponent::set_target_z_sensor ( uint8_t target,
sensor::Sensor * sensor )
inline

Definition at line 129 of file ld600x.h.

◆ setup()

void esphome::ld600x::LD600XComponent::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 177 of file ld600x.cpp.

◆ setup_model()

virtual void esphome::ld600x::LD600XComponent::setup_model ( )
inlineprotectedvirtual

Reimplemented in esphome::ld6002b::LD6002BComponent, and esphome::ld6004::LD6004Component.

Definition at line 222 of file ld600x.h.

◆ SUB_BINARY_SENSOR()

esphome::ld600x::LD600XComponent::SUB_BINARY_SENSOR ( presence )

◆ SUB_SENSOR_WITH_DEDUP()

esphome::ld600x::LD600XComponent::SUB_SENSOR_WITH_DEDUP ( target_count ,
uint32_t  )

◆ try_apply_pending_area_()

void esphome::ld600x::LD600XComponent::try_apply_pending_area_ ( uint8_t reported_kind)
protected

Definition at line 1175 of file ld600x.cpp.

◆ update_area_numbers_()

void esphome::ld600x::LD600XComponent::update_area_numbers_ ( const AreaConfig & area)
protected

Definition at line 1094 of file ld600x.cpp.

◆ update_area_numbers_for_id_()

void esphome::ld600x::LD600XComponent::update_area_numbers_for_id_ ( uint8_t area_id)
protected

Definition at line 1127 of file ld600x.cpp.

◆ write_frame_()

void esphome::ld600x::LD600XComponent::write_frame_ ( uint16_t type,
const uint8_t * data,
uint8_t len,
bool track )
protected

Definition at line 924 of file ld600x.cpp.

Field Documentation

◆ acks_expected_

uint8_t esphome::ld600x::LD600XComponent::acks_expected_ {0}
protected

Definition at line 335 of file ld600x.h.

◆ active_command_

PendingCommand esphome::ld600x::LD600XComponent::active_command_ {}
protected

Definition at line 327 of file ld600x.h.

◆ area_edits_

AreaConfig esphome::ld600x::LD600XComponent::area_edits_ {}
protected

Definition at line 359 of file ld600x.h.

◆ area_id_

uint8_t esphome::ld600x::LD600XComponent::area_id_ {0xFF}
protected

Definition at line 361 of file ld600x.h.

◆ area_id_pref_

ESPPreferenceObject esphome::ld600x::LD600XComponent::area_id_pref_ {}
protected

Definition at line 296 of file ld600x.h.

◆ area_id_pref_initialized_

bool esphome::ld600x::LD600XComponent::area_id_pref_initialized_ {false}
protected

Definition at line 297 of file ld600x.h.

◆ area_id_set_

bool esphome::ld600x::LD600XComponent::area_id_set_ {false}
protected

Definition at line 362 of file ld600x.h.

◆ area_presence_

std::array<binary_sensor::BinarySensor *, AREA_COUNT> esphome::ld600x::LD600XComponent::area_presence_ {}
protected

Definition at line 289 of file ld600x.h.

◆ area_presence_any_

bool esphome::ld600x::LD600XComponent::area_presence_any_ {false}
protected

Definition at line 374 of file ld600x.h.

◆ AREA_REFRESH_TIMEOUT_ID

uint32_t esphome::ld600x::LD600XComponent::AREA_REFRESH_TIMEOUT_ID = 1
staticconstexprprotected

Definition at line 320 of file ld600x.h.

◆ area_values_

std::array<AreaConfig, AREA_COUNT * LD600X_AREA_KINDS> esphome::ld600x::LD600XComponent::area_values_ {}
protected

Definition at line 360 of file ld600x.h.

◆ area_write_in_flight_

bool esphome::ld600x::LD600XComponent::area_write_in_flight_ {false}
protected

Definition at line 375 of file ld600x.h.

◆ area_x_max_

float esphome::ld600x::LD600XComponent::area_x_max_ {NAN}
protected

Definition at line 347 of file ld600x.h.

◆ area_x_min_

float esphome::ld600x::LD600XComponent::area_x_min_ {NAN}
protected

Definition at line 346 of file ld600x.h.

◆ area_y_max_

float esphome::ld600x::LD600XComponent::area_y_max_ {NAN}
protected

Definition at line 349 of file ld600x.h.

◆ area_y_min_

float esphome::ld600x::LD600XComponent::area_y_min_ {NAN}
protected

Definition at line 348 of file ld600x.h.

◆ area_z_max_

float esphome::ld600x::LD600XComponent::area_z_max_ {NAN}
protected

Definition at line 351 of file ld600x.h.

◆ area_z_min_

float esphome::ld600x::LD600XComponent::area_z_min_ {NAN}
protected

Definition at line 350 of file ld600x.h.

◆ areas_

std::array<AreaSensors, AREA_COUNT * LD600X_AREA_KINDS> esphome::ld600x::LD600XComponent::areas_ {}
protected

Definition at line 285 of file ld600x.h.

◆ attempts_sent_

uint8_t esphome::ld600x::LD600XComponent::attempts_sent_ {0}
protected

Definition at line 333 of file ld600x.h.

◆ CMD_ACK_TIMEOUT_MS

uint32_t esphome::ld600x::LD600XComponent::CMD_ACK_TIMEOUT_MS = 300
staticconstexprprotected

Definition at line 310 of file ld600x.h.

◆ CMD_FIRST_ACK_TIMEOUT_MS

uint32_t esphome::ld600x::LD600XComponent::CMD_FIRST_ACK_TIMEOUT_MS = 600
staticconstexprprotected

Definition at line 312 of file ld600x.h.

◆ CMD_MAX_RETRIES

uint8_t esphome::ld600x::LD600XComponent::CMD_MAX_RETRIES = 3
staticconstexprprotected

Definition at line 315 of file ld600x.h.

◆ cmd_queue_

StaticRingBuffer<PendingCommand, CMD_QUEUE_SIZE> esphome::ld600x::LD600XComponent::cmd_queue_
protected

Definition at line 324 of file ld600x.h.

◆ CMD_QUEUE_SIZE

uint8_t esphome::ld600x::LD600XComponent::CMD_QUEUE_SIZE = 24
staticconstexprprotected

Definition at line 309 of file ld600x.h.

◆ command_active_

bool esphome::ld600x::LD600XComponent::command_active_ {false}
protected

Definition at line 325 of file ld600x.h.

◆ command_sent_

bool esphome::ld600x::LD600XComponent::command_sent_ {false}
protected

Definition at line 326 of file ld600x.h.

◆ deferred_apply_pending_

bool esphome::ld600x::LD600XComponent::deferred_apply_pending_ {false}
protected

Definition at line 376 of file ld600x.h.

◆ last_send_ms_

uint32_t esphome::ld600x::LD600XComponent::last_send_ms_ {0}
protected

Definition at line 329 of file ld600x.h.

◆ last_target_presence_

std::array<bool, LD600X_MAX_TARGETS> esphome::ld600x::LD600XComponent::last_target_presence_ {}
protected

Definition at line 381 of file ld600x.h.

◆ last_traffic_ms_

uint32_t esphome::ld600x::LD600XComponent::last_traffic_ms_ {0}
protected

Definition at line 331 of file ld600x.h.

◆ log_tag_

const char* esphome::ld600x::LD600XComponent::log_tag_
protected

Definition at line 225 of file ld600x.h.

◆ MODEL_TIMEOUT_ID

uint32_t esphome::ld600x::LD600XComponent::MODEL_TIMEOUT_ID = 0
staticconstexprprotected

Definition at line 317 of file ld600x.h.

◆ MODULE_AWAKE_MS

uint32_t esphome::ld600x::LD600XComponent::MODULE_AWAKE_MS = 10000
staticconstexprprotected

Definition at line 314 of file ld600x.h.

◆ next_frame_id_

uint16_t esphome::ld600x::LD600XComponent::next_frame_id_ {0}
protected

Definition at line 301 of file ld600x.h.

◆ parser_

FrameParser esphome::ld600x::LD600XComponent::parser_
protected

Definition at line 300 of file ld600x.h.

◆ pending_area_id_

uint8_t esphome::ld600x::LD600XComponent::pending_area_id_ {0xFF}
protected

Definition at line 377 of file ld600x.h.

◆ pending_area_updates_

AreaConfig esphome::ld600x::LD600XComponent::pending_area_updates_ {}
protected

Definition at line 378 of file ld600x.h.

◆ point_cloud_enabled_

bool esphome::ld600x::LD600XComponent::point_cloud_enabled_ {false}
protected

Definition at line 373 of file ld600x.h.

◆ retries_left_

uint8_t esphome::ld600x::LD600XComponent::retries_left_ {0}
protected

Definition at line 328 of file ld600x.h.

◆ send_generation_

uint8_t esphome::ld600x::LD600XComponent::send_generation_ {0}
protected

Definition at line 342 of file ld600x.h.

◆ sensor

binary_sensor::BinarySensor* esphome::ld600x::LD600XComponent::sensor
Initial value:
{
if (target >= LD600X_MAX_TARGETS)
return

Definition at line 152 of file ld600x.h.

◆ slot_cluster_

std::array<int32_t, LD600X_MAX_TARGETS> esphome::ld600x::LD600XComponent::slot_cluster_ {}
protected

Definition at line 365 of file ld600x.h.

◆ slot_occupied_

std::array<bool, LD600X_MAX_TARGETS> esphome::ld600x::LD600XComponent::slot_occupied_ {}
protected

Definition at line 366 of file ld600x.h.

◆ stale_ack_count_

uint8_t esphome::ld600x::LD600XComponent::stale_ack_count_ {0}
protected

Definition at line 338 of file ld600x.h.

◆ STALE_ACK_MAX_AGE_MS

uint32_t esphome::ld600x::LD600XComponent::STALE_ACK_MAX_AGE_MS = 1000
staticconstexprprotected

Definition at line 322 of file ld600x.h.

◆ stale_ack_ms_

uint32_t esphome::ld600x::LD600XComponent::stale_ack_ms_ {0}
protected

Definition at line 340 of file ld600x.h.

◆ stale_ack_type_

uint16_t esphome::ld600x::LD600XComponent::stale_ack_type_ {0}
protected

Definition at line 337 of file ld600x.h.

◆ target_display_enabled_

bool esphome::ld600x::LD600XComponent::target_display_enabled_ {false}
protected

Definition at line 372 of file ld600x.h.

◆ target_presence_ [1/2]

this esphome::ld600x::LD600XComponent::target_presence_[target] = sensor

Definition at line 155 of file ld600x.h.

◆ target_presence_ [2/2]

std::array<binary_sensor::BinarySensor *, LD600X_MAX_TARGETS> esphome::ld600x::LD600XComponent::target_presence_ {}
protected

Definition at line 288 of file ld600x.h.

◆ target_presence_any_

bool esphome::ld600x::LD600XComponent::target_presence_any_ {false}
protected

Definition at line 368 of file ld600x.h.

◆ targets_

std::array<TargetSensors, LD600X_MAX_TARGETS> esphome::ld600x::LD600XComponent::targets_ {}
protected

Definition at line 284 of file ld600x.h.

◆ version_pref_

ESPPreferenceObject esphome::ld600x::LD600XComponent::version_pref_ {}
protected

Definition at line 292 of file ld600x.h.

◆ version_pref_initialized_

bool esphome::ld600x::LD600XComponent::version_pref_initialized_ {false}
protected

Definition at line 293 of file ld600x.h.

◆ z_max_

float esphome::ld600x::LD600XComponent::z_max_ {NAN}
protected

Definition at line 345 of file ld600x.h.

◆ z_min_

float esphome::ld600x::LD600XComponent::z_min_ {NAN}
protected

Definition at line 344 of file ld600x.h.


The documentation for this class was generated from the following files: