Added APDS9306 documentation

This commit is contained in:
Aodren Auffrédou-Heinicke 2024-05-08 19:03:49 -07:00
parent 32a3645a05
commit f479d73b7d
1 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,65 @@
APDS9306 Sensor
===============
.. seo::
:description: Instructions for setting up APDS9306 sensors.
:image: apds9306.jpg
.. _apds9306-component:
Component
---------
The ``apds9306`` sensor component allows you to use APDS9306 ambiant light sensors (`datasheet <https://docs.broadcom.com/doc/AV02-4755EN>`) with ESPHome.
The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.
.. code-block:: yaml
# Example configuration entry
apds9306:
address: 0x52
update_interval: 60s
sensor:
- platform: apds9306
type: light_level
name: "APDS9306 Light Level"
Configuration variables:
------------------------
Base configuration:
- **address** (*Optional*, int): The I²C address of the sensor. Defaults to ``0x52``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval at which the sensor reading will be updated. Defaults to ``60s``.
- **gain** (*Optional*, int): The gain of the ambiant light sensor. One of 1, 3, 6, 9, 18. Defaults to ``1``.
- **bit_width** (*Optional*, int): The bit width/resolution of the ambiant light sensor. One of
20 - 400ms
19 - 200ms
18 - 100ms (``default``)
17 - 50ms
16 - 25ms
13 - 3.125ms
- **measurement_rate** (*Optional*, int): The measurement rate of the ambiant light sensor. One of
25ms
50ms
100ms (``default``)
200ms
500ms
1000ms
Sensor
------
The ``apds9306`` sensor allows you to use your :doc:`apds9306` to perform ambiant light measurements.
Configuration variables:
- **name** (**Required**, string): The name for the sensor.
- **type** (**Required**, string): The type of sensor measurement, must be ``light_level``
- **id** (**Optional**, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All opther options from :ref:`Sensor <config-sensor>`.
See Also
--------
- :ref:`sensor-filters`