|
| 1 | +TF-Luna LiDAR Distance Sensor |
| 2 | +======================================= |
| 3 | + |
| 4 | +.. seo:: |
| 5 | + :description: Instructions for setting up TF-Luna distance sensors in ESPHome. |
| 6 | + :image: tfluna.jpg |
| 7 | + :keywords: tfluna |
| 8 | + |
| 9 | +Component/Hub |
| 10 | +------------- |
| 11 | +.. _tfluna-component: |
| 12 | + |
| 13 | +The ``tfluna`` sensor platform allows you to use TF-Luna distance sensor (`datasheet <https://files.waveshare.com/upload/a/ac/SJ-PM-TF-Luna_A05_Product_Manual.pdf>`__) |
| 14 | +with ESPHome to measure distances. The sensor works optically by emitting short infrared pulses |
| 15 | +and measuring the time it takes the light to be reflected back. |
| 16 | + |
| 17 | +The sensor can measure distances in range 20-800 centimeters, though that figure depends significantly |
| 18 | +on several conditions like surface reflectance, field of view, temperature etc. . |
| 19 | + |
| 20 | +The :ref:`I²C Bus <i2c>` is |
| 21 | +required to be set up in your configuration for this sensor to work. |
| 22 | + |
| 23 | +.. figure:: images/tfluna.jpg |
| 24 | + :align: center |
| 25 | + :width: 50.0% |
| 26 | + |
| 27 | + TF-Luna Time Of Flight Distance Sensor. |
| 28 | + |
| 29 | +.. code-block:: yaml |
| 30 | +
|
| 31 | + # Example configuration entry |
| 32 | + tfluna: |
| 33 | +
|
| 34 | +Configuration variables: |
| 35 | +------------------------ |
| 36 | + |
| 37 | +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the |
| 38 | + sensor. Defaults to ``60s``. |
| 39 | +- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x10``. |
| 40 | +- All other options from :ref:`Sensor <config-sensor>`. |
| 41 | + |
| 42 | +Sensor |
| 43 | +------ |
| 44 | + |
| 45 | +The ``tfluna`` sensor allows you to use your :doc:`tfluna` to perform different |
| 46 | +measurements. |
| 47 | + |
| 48 | +.. code-block:: yaml |
| 49 | +
|
| 50 | + sensor: |
| 51 | + - platform: tfluna |
| 52 | + distance: |
| 53 | + name: Distance |
| 54 | + signal_strength: |
| 55 | + name: Signal Strength |
| 56 | + temperature: |
| 57 | + name: TF-Luna Temperature |
| 58 | +
|
| 59 | +.. _tfluna-sensors: |
| 60 | + |
| 61 | +Configuration variables: |
| 62 | +************************ |
| 63 | + |
| 64 | +- **distance** (*Optional*, int): Distance in cm. |
| 65 | + All options from :ref:`Sensor <config-sensor>`. |
| 66 | +- **signal_strength** (*Optional*, int): Signal strength. If lower than 100, the range value is considered not reliable. If over 30000, there is an ambient light overexposure, for instance, when the sensor faces the sun outside. |
| 67 | + All options from :ref:`Sensor <config-sensor>`. |
| 68 | +- **temperature** (*Optional*, float): Sensor temperature in degrees Celsius. |
| 69 | + All options from :ref:`Sensor <config-sensor>`. |
| 70 | +- **tfluna_id** (*Optional*, :ref:`config-id`): Manually specify the ID for the :doc:`tfluna` component if you are using multiple components. |
| 71 | + |
| 72 | + |
| 73 | +Text Sensor |
| 74 | +----------- |
| 75 | + |
| 76 | +The ``tfluna`` text sensor allows you to get information about your :doc:`tfluna`. |
| 77 | + |
| 78 | +.. code-block:: yaml |
| 79 | +
|
| 80 | + text_sensor: |
| 81 | + - platform: tfluna |
| 82 | + version: |
| 83 | + name: "firmware version" |
| 84 | +
|
| 85 | +Configuration variables: |
| 86 | +************************ |
| 87 | + |
| 88 | +- **version** (*Optional*): The firmware version. |
| 89 | + All options from :ref:`Text Sensor <config-text_sensor>`. |
| 90 | +- **tfluna_id** (*Optional*, :ref:`config-id`): Manually specify the ID for the :doc:`tfluna` component if you are using multiple components. |
| 91 | + |
| 92 | +See Also |
| 93 | +-------- |
| 94 | + |
| 95 | +- :ref:`sensor-filters` |
| 96 | +- :apiref:`tfluna/tfluna.h` |
| 97 | +- :ghedit:`Edit` |
| 98 | + |
0 commit comments