mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
54 lines
1.6 KiB
ReStructuredText
54 lines
1.6 KiB
ReStructuredText
BH1750 Ambient Light Sensor
|
|
===========================
|
|
|
|
.. seo::
|
|
:description: Instructions for setting up BH1750 ambient light sensors in ESPHome.
|
|
:image: bh1750.jpg
|
|
:keywords: BH1750
|
|
|
|
The ``bh1750`` sensor platform allows you to use your BH1750
|
|
(`datasheet <http://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf>`__)
|
|
ambient light sensor with ESPHome. The :ref:`I²C bus <i2c>` is required to be set up in
|
|
your configuration for this sensor to work.
|
|
|
|
.. figure:: images/bh1750-full.jpg
|
|
:align: center
|
|
:width: 50.0%
|
|
|
|
BH1750 Ambient Light Sensor.
|
|
|
|
.. figure:: images/bh1750-ui.png
|
|
:align: center
|
|
:width: 80.0%
|
|
|
|
.. code-block:: yaml
|
|
|
|
# Example configuration entry
|
|
sensor:
|
|
- platform: bh1750
|
|
name: "BH1750 Illuminance"
|
|
address: 0x23
|
|
update_interval: 60s
|
|
|
|
Configuration variables:
|
|
------------------------
|
|
|
|
- **name** (**Required**, string): The name for the sensor.
|
|
- **address** (*Optional*, int): Manually specify the I²C 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``.
|
|
- **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>`.
|
|
|
|
See Also
|
|
--------
|
|
|
|
- :ref:`sensor-filters`
|
|
- :doc:`tsl2561`
|
|
- :apiref:`bh1750/bh1750.h`
|
|
- `BH1750 Library <https://github.com/claws/BH1750>`__ by `@claws <https://github.com/claws>`__
|
|
- :ghedit:`Edit`
|