esphome-docs/components/sensor/tsl2561.rst

63 lines
2.2 KiB
ReStructuredText
Raw Normal View History

2018-05-14 21:15:49 +02:00
TSL2561 Ambient Light Sensor
============================
2018-11-14 22:12:27 +01:00
.. seo::
2019-02-16 23:25:23 +01:00
:description: Instructions for setting up TSL2561 ambient light sensors in ESPHome.
2018-11-14 22:12:27 +01:00
:image: tsl2561.jpg
:keywords: TSL2561
2018-10-04 17:25:27 +02:00
The ``tsl2561`` sensor platform allows you to use your TSL2561
2018-05-14 21:15:49 +02:00
(`datasheet <https://cdn-shop.adafruit.com/datasheets/TSL2561.pdf>`__,
`Adafruit`_)
2019-02-16 23:25:23 +01:00
ambient light sensor with ESPHome. The :ref:`I²C <i2c>` is required to be set up in
2018-05-14 21:15:49 +02:00
your configuration for this sensor to work.
2018-06-01 18:10:00 +02:00
.. figure:: images/tsl2561-full.jpg
:align: center
:width: 50.0%
2018-05-14 21:15:49 +02:00
TSL2561 Ambient Light Sensor.
2018-05-14 21:15:49 +02:00
.. _Adafruit: https://www.adafruit.com/product/439
.. figure:: images/tsl2561-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
2018-05-14 21:15:49 +02:00
# Example configuration entry
sensor:
- platform: tsl2561
name: "TSL2561 Ambient Light"
address: 0x39
2019-01-06 18:56:14 +01:00
update_interval: 60s
2018-05-14 21:15:49 +02:00
Configuration variables:
------------------------
2018-05-14 21:15:49 +02:00
2018-06-01 18:10:00 +02:00
- **name** (**Required**, string): The name for the sensor.
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x39``.
2018-06-01 18:10:00 +02:00
- **integration_time** (*Optional*, :ref:`config-time`):
The time the sensor will take for each measurement. Longer means more accurate values. One of
``14ms``, ``101ms``, ``402ms``. Defaults to ``402ms``.
- **gain** (*Optional*, string): The gain of the sensor. Higher values are better in low-light conditions.
One of ``1x`` and ``16x``. Defaults to ``1x``.
- **is_cs_package** (*Optional*, boolean): The "CS" package of this sensor has a slightly different
formula for calculating the illuminance in lx. Set this to ``true`` if you're working with a CS
package. Defaults to ``false``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
2019-01-06 18:56:14 +01:00
sensor. Defaults to ``60s``.
2018-06-01 18:10:00 +02:00
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
2019-02-17 12:28:17 +01:00
- All other options from :ref:`Sensor <config-sensor>`.
2018-06-01 18:10:00 +02:00
See Also
--------
2018-06-01 18:10:00 +02:00
- :ref:`sensor-filters`
- :doc:`bh1750`
- :doc:`adc`
2020-05-10 21:27:59 +02:00
- `SparkFun TSL2561 Arduino Library <https://github.com/sparkfun/SparkFun_TSL2561_Arduino_Library>`__ by `SparkFun <https://sparkfun.com/>`__
2019-05-12 22:44:59 +02:00
- :apiref:`tsl2561/tsl2561.h`
- :ghedit:`Edit`