esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
285 stars 34 forks source link

Conflicting definitions of BUTTON causes compile error #5744

Open fhriley opened 3 weeks ago

fhriley commented 3 weeks ago

The problem

In file included from /Users/friley/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29,
                 from /Users/friley/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:79,
                 from /Users/friley/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
                 from .piolibdeps/ac-return/ArduinoJson/src/ArduinoJson/Configuration.hpp:156,
                 from .piolibdeps/ac-return/ArduinoJson/src/ArduinoJson.hpp:7,
                 from .piolibdeps/ac-return/ArduinoJson/src/ArduinoJson.h:9,
                 from src/esphome/components/json/json_util.h:11,
                 from src/esphome/core/string_ref.h:10,
                 from src/esphome/core/entity_base.h:5,
                 from src/esphome/components/binary_sensor/binary_sensor.h:4,
                 from src/esphome/core/controller.h:5,
                 from src/esphome/components/api/api_server.h:9,
                 from src/esphome/components/api/api_connection.h:6,
                 from src/esphome/components/api/api_connection.cpp:1:
/Users/friley/.platformio/packages/framework-arduinoespressif32/variants/adafruit_feather_esp32_v2/pins_arduino.h:51:16: error: expected identifier before numeric constant
 #define BUTTON 38
                ^~
src/esphome/core/component_iterator.h:106:5: note: in expansion of macro 'BUTTON'
     BUTTON,
     ^~~~~~

Which version of ESPHome has the issue?

2024.4.1

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

N/A

What platform are you using?

ESP32

Board

adafruit_feather_esp32_v2

Component causing the issue

restart

Example YAML snippet

esp32:
  board: adafruit_feather_esp32_v2

button:
  - platform: restart
    name: 'Reboot'

esphome:
  name: foo

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: !secret wifi_domain
  fast_connect: off
  power_save_mode: none

Anything in the logs that might be useful for us?

No response

Additional information

No response