2018-05-14 21:15:49 +02:00
|
|
|
BH1750 Ambient Light Sensor
|
|
|
|
===========================
|
|
|
|
|
|
|
|
The ``bh1750`` sensor platform allows you to use your BH1750
|
|
|
|
(`datasheet <http://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf>`__, `Aliexpress`_, `mklec`_)
|
2018-06-01 18:10:00 +02:00
|
|
|
ambient light sensor with esphomelib. The :ref:`I²C bus <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/bh1750-full.jpg
|
|
|
|
:align: center
|
|
|
|
:width: 50.0%
|
2018-05-14 21:15:49 +02:00
|
|
|
|
2018-08-22 22:05:28 +02:00
|
|
|
BH1750 Ambient Light Sensor.
|
2018-05-14 21:15:49 +02:00
|
|
|
|
|
|
|
.. _Aliexpress: https://www.adafruit.com/product/1603
|
|
|
|
.. _mklec: http://mklec.com/modules/micro-controller-modules/bh1750-bh1750fvi-digital-light-sensor-module
|
|
|
|
|
2018-08-22 22:05:28 +02:00
|
|
|
.. figure:: images/bh1750-ui.png
|
|
|
|
:align: center
|
|
|
|
:width: 80.0%
|
|
|
|
|
2018-05-14 21:15:49 +02:00
|
|
|
.. code:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
sensor:
|
|
|
|
- platform: bh1750
|
2018-08-22 22:05:28 +02:00
|
|
|
name: "BH1750 Illuminance"
|
2018-05-14 21:15:49 +02:00
|
|
|
address: 0x23
|
|
|
|
update_interval: 15s
|
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------------
|
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^2c address of the sensor.
|
|
|
|
Defaults to ``0x23`` (address if address pin is pulled low). If the address pin is pulled high,
|
|
|
|
the address is ``0x5C``.
|
|
|
|
- **resolution** (*Optional*, string): The resolution of the sensor in lx. One of ``4.0``,
|
|
|
|
``1.0``, ``0.5``. Defaults to ``0.5`` (the maximum resolution).
|
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
2018-06-01 18:44:15 +02:00
|
|
|
sensor. Defaults to ``15s``. See :ref:`sensor-default_filter`.
|
2018-06-01 18:10:00 +02:00
|
|
|
- **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
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-06-01 18:10:00 +02:00
|
|
|
|
|
|
|
- :ref:`sensor-filters`
|
|
|
|
- :doc:`tsl2561`
|
|
|
|
- :doc:`API Reference </api/sensor/bh1750>`
|
2018-08-24 22:44:01 +02:00
|
|
|
- `BH1750 Library <https://github.com/claws/BH1750>`__ by `@claws <https://github.com/claws>`__
|
2018-06-04 08:17:22 +02:00
|
|
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/sensor/bh1750.rst>`__
|