Restructured and added images and link in index.rst

This commit is contained in:
Aodren Auffrédou-Heinicke 2024-05-08 21:09:30 -07:00
parent 03b48fd022
commit 4917fac28e
3 changed files with 30 additions and 31 deletions

View File

@ -3,7 +3,7 @@ APDS9306 Sensor
.. seo::
:description: Instructions for setting up APDS9306 sensors.
:image: apds9306.jpg
:image: apds9306.png
.. _apds9306-component:
@ -11,54 +11,52 @@ APDS9306 Sensor
Component
---------
The ``apds9306`` sensor component allows you to use APDS9306 ambiant light sensors (`datasheet <https://docs.broadcom.com/doc/AV02-4755EN>`) with ESPHome.
The ``apds9306`` sensor component allows you to use APDS9306 ambient light sensors (`datasheet <https://docs.broadcom.com/doc/AV02-4755EN>`__, `Broadcom`_) with ESPHome.
The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.
.. figure:: images/apds9306.png
:align: center
:width: 80.0%
Image by `Broadcom`_
.. code-block:: yaml
# Example configuration entry
apds9306:
address: 0x52
update_interval: 60s
sensor:
- platform: apds9306
type: light_level
name: "APDS9306 Light Level"
name: "APDS9306 Light Level" # below are optional
gain: 1
bit_width: 18
measurement_rate: 100ms
update_interval: 60s
.. _Broadcom: https://www.broadcom.com/products/optical-sensors/ambient-light-photo-sensors/apds-9306-065
Configuration variables:
------------------------
Base configuration:
The ``apds9306`` sensor allows you to use your :doc:`apds9306` to perform ambient light measurements.
- **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
- **name** (**Required**, string): The name for the sensor.
- **address** (*Optional*, int): The I²C address of the sensor. Should be ``0x52`` according to datasheet ("Contact factory for other addressing options").
- **gain** (*Optional*, int): The gain of the ambient light sensor. One of 1, 3, 6, 9, 18. Defaults to ``1``.
- **bit_width** (*Optional*, int): The bit width/resolution of the ambient light sensor. One of
- 20 - takes 400ms
- 19 - takes 200ms
- 18 - takes 100ms (``default``)
- 17 - takes 50ms
- 16 - takes 25ms
- 13 - takes 3.125ms
- **measurement_rate** (*Optional*, int): The measurement rate of the ambient 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``
- **update_interval** (*Optional*, :ref:`config-time`): The interval at which the sensor reading will be updated. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All opther options from :ref:`Sensor <config-sensor>`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -434,6 +434,7 @@ Light
.. imgtable::
AM43, components/sensor/am43, am43.jpg, Lux
APDS9306, components/sensor/apds9306, apds9306.png, Lux
APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture
AS7341, components/sensor/as7341, as7341.jpg, Spectral Color Sensor
BH1750, components/sensor/bh1750, bh1750.jpg, Lux