Tidying up LD2420 doc (#3337)

Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
This commit is contained in:
Keith Burzinski 2023-11-07 20:27:15 -06:00 committed by Jesse Hills
parent 8ef21d0e68
commit 4af984ad4a
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
1 changed files with 30 additions and 34 deletions

View File

@ -27,8 +27,8 @@ Select, number and button components provide configuration value inputs and cont
HLK-LD2420 Low power motion and presence sensor.
Pinouts
-------
Module Pinouts
--------------
.. list-table:: Firmware 1.5.2 and older
:widths: 25 25 25
@ -79,16 +79,6 @@ Pinouts
.. code-block:: yaml
# Example configuration entry
uart:
id: ld2420_uart
tx_pin: REPLACEME
rx_pin: REPLACEME
baud_rate: 115200
parity: NONE
stop_bits: 1
# The LD2420 has 16 time gate intervals (0-15) with a gate
# resolution of 0.70 meters
ld2420:
text_sensor:
@ -119,6 +109,7 @@ Pinouts
name: Detection Gate Minimum
max_gate_distance:
name: Detection Gate Maximum
# See "Number" section below for detail
gate_select:
name: Select Gate to Set
still_threshold:
@ -189,6 +180,7 @@ Configuration variables:
************************
- **operating_mode** (*Required*): Provisions the operating mode select component.
May contain any options from :ref:`Select <config-select>`.
Number
------
@ -232,39 +224,41 @@ Configuration variables:
- **presence_timeout** (*Optional*): The time in seconds during which the occupied state (presence) will persist after
presence is no longer detected. Any energy detection within the time window restarts the countdown from this value.
Defaults to 120s. **Required** when ``min_gate_distance`` and ``max_gate_distance`` is specified.
Defaults to 120s. **Required** when ``min_gate_distance`` and ``max_gate_distance`` is specified. May contain any
options from :ref:`Number <config-number>`.
- **min_gate_distance** (*Optional*): Minimum distance for move or still energy detection. Value between 0 and
``max_gate_distance`` - 1. Each increment equals 70 cm. Defaults to 1. **Required** when ``presence_timeout`` and
``max_gate_distance`` is specified.
``max_gate_distance`` is specified. May contain any options from :ref:`Number <config-number>`.
- **max_gate_distance** (*Optional*): Maximum gate for movement detection. Value from 1 to 15. Each gate detects
movement and still energy at 70 cm increments. At the maximum value, the sensors range equates to 16 * 70 cm
resulting in an approximately 12-meter range; however, accuracy at this range may be diminished. The recommended
maximum value is 12 * 70 cm which results in approximately 9 meters. **Required** when ``presence_timeout`` and
``min_gate_distance`` is specified.
``min_gate_distance`` is specified. May contain any options from :ref:`Number <config-number>`.
- **gate_still_sensitivity** (*Optional*): Gate still threshold calibration sensitivity factor. Defaults to 0.5 with a
range of 0-1, 0 = high and 1 = low.
range of 0-1, 0 = high and 1 = low. May contain any options from :ref:`Number <config-number>`.
- **gate_move_sensitivity** (*Optional*): Gate move threshold calibration sensitivity factor. Defaults to 0.5 with a
range of 0-1, 0 = high and 1 = low.
range of 0-1, 0 = high and 1 = low. May contain any options from :ref:`Number <config-number>`.
- **gate_select** (*Optional*): Selection of gate value to edit (gate # from 0 to 15). Gate thresholds
are edited by selecting the gate number and then adjusting the move and still thresholds. **Note that when this
variable is defined, the component will run in compact UI mode and the following two configuration variables are then
required:**
required:** May contain any options from :ref:`Number <config-number>`.
- **still_threshold** (*Optional*): Gate still value threshold level for motion energy detection on a currently
selected gate number. A value greater than that specified for the gate (distance) will trigger movement detection.
May contain any options from :ref:`Number <config-number>`.
- **move_threshold** (*Optional*): Gate move value threshold level for still energy detection on a currently selected
gate number. A value less than that specified for the gate (distance) will trigger still detection.
gate number. A value less than that specified for the gate (distance) will trigger still detection. May contain any
options from :ref:`Number <config-number>`.
- **gate_n** (*Optional*): Provides individual gate threshold number inputs. Range is ``gate_0`` to ``gate_15``.
**May not be used with** ``gate_select`` (above). Each gate entry requires a ``still_threshold`` and ``move_threshold``:
- **still_threshold** (*Required for each gate_n entry*): Gate still value threshold level for motion energy
detection on currently selected gate number. A value greater than that specified for the gate (distance) will
trigger movement detection.
trigger movement detection. May contain any options from :ref:`Number <config-number>`.
- **move_threshold** (*Required for each gate_n entry*): Gate move value threshold level for still energy
detection on currently selected gate number. A value less than that specified for the gate (distance) will
trigger still detection.
trigger still detection. May contain any options from :ref:`Number <config-number>`.
Button
------
@ -287,13 +281,13 @@ Four button components are available enabling configuration controls for editing
Configuration variables:
************************
- **apply_config** (*Optional*): Saves both manual config tuning or the auto calibrate still and move threshold config settings.
- **restart_module** (*Optional*): Reboots the LD2420 modules.
- **apply_config** (*Optional*): Saves both manual config tuning or the auto calibrate still and move threshold config
settings. May contain any options from :ref:`Button <config-button>`.
- **restart_module** (*Optional*): Reboots the LD2420 modules. May contain any options from :ref:`Button <config-button>`.
- **revert_config** (*Optional*): Undoes in-progress edits prior to their application via the ``apply_config`` button.
- **factory_reset** (*Optional*): Restores a base set of LD2420 configuration values.
May contain any options from :ref:`Button <config-button>`.
- **factory_reset** (*Optional*): Restores a base set of LD2420 configuration values. May contain any options from
:ref:`Button <config-button>`.
Factory Reset Values:
*********************
@ -387,8 +381,8 @@ between the sensor and an object moving within its field of detection.
Configuration variables:
************************
- **moving_distance** (*Optional*): Distance between the sensor and the detected moving target.
All options from :ref:`Sensor <config-sensor>`.
- **moving_distance** (*Optional*): Distance between the sensor and the detected moving target. May contain any options
from :ref:`Sensor <config-sensor>`.
Binary Sensor
-------------
@ -406,7 +400,8 @@ Configuration variables:
************************
- **has_target** (*Optional*): If a target is detected with either still or in movement **has_target** will be set true
for the duration of the **presence_time_window** setting.
for the duration of the **presence_time_window** setting. May contain any options from
:ref:`Binary Sensor <config-binary_sensor>`.
Text Sensor
-----------
@ -423,11 +418,12 @@ The ``ld2420`` text sensor provides version information for the :doc:`ld2420`.
Configuration variables:
************************
- **fw_version** (*Optional*): Allows you to retrieve the :doc:`ld2420` firmware version.
- **fw_version** (*Optional*): Allows you to retrieve the :doc:`ld2420` firmware version. May contain any options from
:ref:`Text Sensor <config-text_sensor>`.
Important Information:
**********************
Important Information
---------------------
Solid objects and noise outside the ``detection_gate_max`` and ``detection_gate_min`` may cause false
detections or result in abnormal gate thresholds. For example, a wall within the gate max range can result