APDS9960 Sensor

The apds9960 sensor platform allows you to use your APDS9960 RGB and gesture sensors (datasheet, Sparkfun) with ESPHome. The I²C is required to be set up in your configuration for this sensor to work.

../../_images/apds9960-full.jpg

Image by Sparkfun.

# Example configuration entry
apds9960:
  address: 0x39
  update_interval: 60s

sensor:
  - platform: apds9960
    type: CLEAR
    name: "APDS9960 Clear Channel"

binary_sensor:
  - platform: apds9960
    direction: UP
    name: "APDS960 Up Movement"
  # Repeat for each direction

Configuration variables:

The configuration is made up of three parts: The central component, individual sensors, and direction binary sensors.

Base Configuration:

  • address (Optional, integer): The i2c address of the sensor. Defaults to 0x39.
  • update_interval (Optional, Time): The interval to check the sensor. Defaults to 60s.

Sensor Configuration:

  • name (Required, string): The name for the sensor.
  • type (Required, string): The type of sensor measurement. One of
    • CLEAR
    • RED
    • GREEN
    • BLUE
    • PROXIMITY
  • id (Optional, ID): Set the ID of this sensor for use in lambdas.
  • All other options from Sensor.

Binary Sensor Configuration:

  • name (Required, string): The name for the binary sensor.
  • direction (Required, string): The direction to measure. One of:
    • UP
    • DOWN
    • LEFT
    • RIGHT
  • id (Optional, ID): Manually specify the ID used for code generation.
  • All other options from Binary Sensor.