Hi all,
I’ve got gesture control set up with an ESP8266 board using an sparkfun APDS9960 sensor.
I gesture right/left to turn on/off light1 and I gesture up/down to turn on/off light2
However I’m also looking to utilise the NEAR and FAR commands. I try and add it in using code following scheme below but does not recognise it when I export the code to the ESP using ESPHome
I try and add in the below under the RIGHT command per below but get the following message
(further below)… any suggestions on how I can add in a near / far gesture?
- platform: apds9960*
direction: NEAR*
name: “APDS9960 Near Movement”*
INFO Reading configuration /config/esphome/esptom.yaml…
Failed config
binary_sensor.apds9960: [source /config/esphome/esptom.yaml:56]
- platform: apds9960*
-
- Unknown value ‘NEAR’, valid options are ‘UP’, ‘DOWN’, ‘LEFT’, ‘RIGHT’.*
- direction: NEAR*
- name: APDS9960 Near Movement*
CODE I’M USING THAT DOES WORK FOR LEFT/RIGHT/UP/DOWN:
esphome:
name: esptom
esp8266:
board: nodemcuv2
`# Enable logging
logger:
`# Enable Home Assistant API
api:
encryption:
key: “THE ENCRYPTION KEY”
ota:
password: “THE PASSWORD”
wifi:
ssid: “MY WIFI”
password: “MY WIFI PW”
` # Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: “Esptom Fallback Hotspot”
password: “FALLBACK HOTSPOT PW”
captive_portal:
`# Configuration Entry
apds9960:
address: 0x39
update_interval: 60s
sensor:
- platform: apds9960
type: CLEAR
name: “APDS9960 Clear Channel”
binary_sensor:
-
platform: apds9960
direction: UP
name: “APDS9960 Up Movement” -
platform: apds9960
direction: DOWN
name: “APDS9960 Down Movement” -
platform: apds9960
direction: LEFT
name: “APDS9960 Left Movement” -
platform: apds9960
direction: RIGHT
name: “APDS9960 Right Movement”
i2c:
- id: bus_a
sda: D1
scl: D2
scan: true