diff --git a/components/images/tof10120.jpg b/components/images/tof10120.jpg new file mode 100644 index 000000000..c638fbc75 Binary files /dev/null and b/components/images/tof10120.jpg differ diff --git a/components/sensor/images/tof10120-full.jpg b/components/sensor/images/tof10120-full.jpg new file mode 100644 index 000000000..66329b8c4 Binary files /dev/null and b/components/sensor/images/tof10120-full.jpg differ diff --git a/components/sensor/images/tof10120-ui.png b/components/sensor/images/tof10120-ui.png new file mode 100644 index 000000000..caf511d95 Binary files /dev/null and b/components/sensor/images/tof10120-ui.png differ diff --git a/components/sensor/tof10120.rst b/components/sensor/tof10120.rst new file mode 100644 index 000000000..8badc342b --- /dev/null +++ b/components/sensor/tof10120.rst @@ -0,0 +1,52 @@ +TOF10120 Time Of Flight Distance Sensor +======================================= + +.. seo:: + :description: Instructions for setting up TOF10120 distance sensors in ESPHome. + :image: tof10120.jpg + :keywords: TOF10120 + +The ``tof10120`` sensor platform allows you to use TOF10120 optical time of flight sensor (`datasheet `__) +with ESPHome to measure distances. The sensor works optically by emitting short infrared pulses +and measuring the time it takes the light to be reflected back. + +The sensor can measure distances in range 10-180 centimeters, though that figure depends significantly +on several conditions like surface reflectance, field of view, temperature etc. . + +The :ref:`I²C Bus ` is +required to be set up in your configuration for this sensor to work. + +.. figure:: images/tof10120-full.jpg + :align: center + :width: 50.0% + + TOF10120 Time Of Flight Distance Sensor. + +.. figure:: images/tof10120-ui.png + :align: center + :width: 80.0% + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: tof10120 + name: "TOF10120 Distance" + update_interval: 5s + +Configuration variables: +------------------------ + +- **name** (**Required**, string): The name of the sensor. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. +- **address** (*Optional*, int): Manually specify the I^2C address of the sensor. Defaults to ``0x52``. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Sensor `. + +See Also +-------- + +- :ref:`sensor-filters` +- :apiref:`tof10120/tof10120_sensor.h` +- :ghedit:`Edit` diff --git a/images/tof10120.jpg b/images/tof10120.jpg new file mode 100644 index 000000000..c638fbc75 Binary files /dev/null and b/images/tof10120.jpg differ diff --git a/index.rst b/index.rst index ab20cf09f..31995209b 100644 --- a/index.rst +++ b/index.rst @@ -169,6 +169,7 @@ Sensor Components Template Sensor, components/sensor/template, description.svg TMP102, components/sensor/tmp102, tmp102.jpg TMP117, components/sensor/tmp117, tmp117.jpg + TOF10120, components/sensor/tof10120, tof10120.jpg Total Daily Energy, components/sensor/total_daily_energy, sigma.svg TSL2561, components/sensor/tsl2561, tsl2561.jpg Tuya Sensor, components/sensor/tuya, tuya.png