esphome-docs/components/sensor/tsl2561.rst
Otto Winter 8d9b0d2375
Netlify (#153)
* Netlify

* Fix

* Faster doxygen

* Update Makefile

* Try without api

* Debug

* Fix

* Update Makefile

* Debug

* Try 1.8.13

* Remove debug

* Update Makefile

* Optimize
2019-02-07 13:54:45 +01:00

65 lines
2.3 KiB
ReStructuredText

TSL2561 Ambient Light Sensor
============================
.. seo::
:description: Instructions for setting up TSL2561 ambient light sensors in esphomelib.
:image: tsl2561.jpg
:keywords: TSL2561
The ``tsl2561`` sensor platform allows you to use your TSL2561
(`datasheet <https://cdn-shop.adafruit.com/datasheets/TSL2561.pdf>`__,
`Adafruit`_)
ambient light sensor with esphomelib. The :ref:`I²C <i2c>` is required to be set up in
your configuration for this sensor to work.
.. figure:: images/tsl2561-full.jpg
:align: center
:width: 50.0%
TSL2561 Ambient Light Sensor.
.. _Adafruit: https://www.adafruit.com/product/439
.. figure:: images/tsl2561-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: tsl2561
name: "TSL2561 Ambient Light"
address: 0x39
update_interval: 60s
Configuration variables:
------------------------
- **name** (**Required**, string): The name for the sensor.
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x39``.
- **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
sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------
- :ref:`sensor-filters`
- :doc:`bh1750`
- :doc:`adc`
- `SparkFun TSL2561 Arduino Library <https://github.com/sparkfun/SparkFun_TSL2561_Arduino_Library>`__ by `Sparkfun <https://sparkfun.com/>`__
- :apiref:`sensor/tsl2561_sensor.h`
- :ghedit:`Edit`
.. disqus::