PCA9685 compilation error

Hello all,
I have an issue to setup the PCA9685 GPIO extender in my configuration.
My setup is with an ESP32-S3 Wroom 1 N16 with two i2c busses, one for 5V and another one for 3.3V devices. Linked my PCA9685 to the 5V bus but wne tries to compile, I got the following error:

INFO ESPHome 2025.4.1
INFO Reading configuration /config/esphome/water-system.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing water-system (board: esp32-s3-devkitc-1; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.3.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.6
|-- Wire @ 2.0.0
Compiling .pioenvs/water-system/src/esphome/components/pca9685/pca9685_output.cpp.o
In file included from src/esphome/components/pca9685/pca9685_output.cpp:1:
src/esphome/components/pca9685/pca9685_output.h:4:10: fatal error: esphome/components/output/float_output.h: No such file or directory
 #include "esphome/components/output/float_output.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pioenvs/water-system/src/main.cpp.o
*** [.pioenvs/water-system/src/esphome/components/pca9685/pca9685_output.cpp.o] Error 1
In file included from src/esphome.h:41,
                 from src/main.cpp:3:
src/esphome/components/pca9685/pca9685_output.h:4:10: fatal error: esphome/components/output/float_output.h: No such file or directory
 #include "esphome/components/output/float_output.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/water-system/src/main.cpp.o] Error 1
========================== [FAILED] Took 2.96 seconds ==========================

The configuration file looks like this:

esphome:
  name: water-system
  friendly_name: water_system

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: "1DZKI8KSwWXS+30VHNoC8ak9kiRP6rCEgJH8W+W5S6o="

ota:
  - platform: esphome
    password: "92e8e9ad74b95d69b357a00cf6e5ee0a"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Water-System Fallback Hotspot"
    password: "xxxxxxXXXXXxxxxxx"

  manual_ip:
    static_ip: 192.168.3.50
    gateway: 192.168.3.1
    subnet: 255.255.255.0

i2c:
  - id: bus_5V
    sda: GPIO1
    scl: GPIO2
    scan: true
    frequency: 500kHz


  - id: bus_3V
    sda: GPIO5
    scl: GPIO4
    scan: true

ads1115:
  i2c_id: bus_5V
  address: 0x48
  id: ads1115_48

pcf8574:
  id: extender
  address: 0x20
  i2c_id: bus_5V
  pcf8575: true

sensor:
  - platform: bmp280_i2c
    address: 0x77
    i2c_id: bus_3V
    temperature:
      accuracy_decimals: 2
      device_class: temperature
      name: "Garage Temperature"
    pressure: 
      accuracy_decimals: 2
      name: "Garage Air Pressure"
      device_class: pressure
    update_interval: 60s

  - platform: aht10
    variant: aht20
    address: 0x38
    i2c_id: bus_3V
    humidity: 
      name: "Garage Humidity"
      accuracy_decimals: 2
    update_interval: 60s

pca9685:
  - id: led_hub
    frequency: 500
    address: 0x70
    i2c_id: bus_5V


captive_portal:

Any help would be highly appreciated since I have hit my head against the wall for several hours already.
Thank you all in advance for helping with this matter.

Later edit:
Forgot to mention, if I comment the pca9685 lines, the compilation works well and the system detects the extender with the addresses 0x55 and 0x70 (see below):

INFO ESPHome 2025.4.1
INFO Reading configuration /config/esphome/water-system.yaml...
INFO Starting log output from 192.168.3.50 using esphome API
INFO Successfully connected to water-system @ 192.168.3.50 in 0.033s
INFO Successful handshake with water-system @ 192.168.3.50 in 0.066s
[01:03:55][I][app:100]: ESPHome version 2025.4.1 compiled on May  4 2025, 00:37:26
[01:03:55][C][wifi:600]: WiFi:
[01:03:55][C][wifi:428]:   Local MAC: CC:BA:97:33:58:00
[01:03:55][C][wifi:433]:   SSID: [redacted]
[01:03:55][C][wifi:436]:   IP Address: 192.168.3.50
[01:03:55][C][wifi:440]:   BSSID: [redacted]
[01:03:55][C][wifi:441]:   Hostname: 'water-system'
[01:03:55][C][wifi:443]:   Signal strength: -48 dB ▂▄▆█
[01:03:55][C][wifi:447]:   Channel: 1
[01:03:55][C][wifi:448]:   Subnet: 255.255.255.0
[01:03:55][C][wifi:449]:   Gateway: 192.168.3.1
[01:03:55][C][wifi:450]:   DNS1: 0.0.0.0
[01:03:55][C][wifi:451]:   DNS2: 0.0.0.0
[01:03:55][C][logger:177]: Logger:
[01:03:55][C][logger:178]:   Max Level: DEBUG
[01:03:55][C][logger:179]:   Initial Level: DEBUG
[01:03:55][C][logger:181]:   Log Baud Rate: 115200
[01:03:55][C][logger:182]:   Hardware UART: USB_CDC
[01:03:55][C][i2c.arduino:071]: I2C Bus:
[01:03:55][C][i2c.arduino:072]:   SDA Pin: GPIO1
[01:03:55][C][i2c.arduino:073]:   SCL Pin: GPIO2
[01:03:55][C][i2c.arduino:074]:   Frequency: 500000 Hz
[01:03:55][C][i2c.arduino:086]:   Recovery: bus successfully recovered
[01:03:55][I][i2c.arduino:096]: Results from i2c bus scan:
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x20
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x48
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x55
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x70
[01:03:55][C][i2c.arduino:071]: I2C Bus:
[01:03:55][C][i2c.arduino:072]:   SDA Pin: GPIO5
[01:03:55][C][i2c.arduino:073]:   SCL Pin: GPIO4
[01:03:55][C][i2c.arduino:074]:   Frequency: 50000 Hz
[01:03:55][C][i2c.arduino:086]:   Recovery: bus successfully recovered
[01:03:55][I][i2c.arduino:096]: Results from i2c bus scan:
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x38
[01:03:55][I][i2c.arduino:102]: Found i2c device at address 0x77
'''

The error will go away once you add an output component, which is presumably the only reason for using the chip.

Thank you Clyde for the answer. I confirm it works after adding the output component in the yaml descriptor.

1 Like