M5Stack Atom Lite, Found no i2c devices?

Hello, I am running an M5Stack Atom Matrix with the U088 TVOC_eCO2 Gas Sensor Unit (SGP30) connected via Grove and I²C. It connects to my Home Assistant and works great.

Now I want to run the sensor with an M5Stack Atom Lite. It is the same chip and almost the same board so even the GPIOs for the Grove connector are the same. I am using the same code but I get “Results from i2c bus scan: Found no i2c devices!”
What am I missing?

Logs, yaml :slight_smile:

:blush: This is my yaml

esphome:
  name: m5-atom2

esp32:
  board: esp32dev

  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

  encryption:
    key: "xxx"

ota:
  password: "xxx"

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

  ap:
    ssid: "M5-Atom2 Fallback Hotspot"
    password: "xxx"

captive_portal:

i2c:
  - id: grove
    sda: 26  
    scl: 32
    scan: true

sensor:
  - platform: sgp30
    i2c_id: grove
    address: 0x58
    eco2:
      name: "Atom2 eCO2"
      accuracy_decimals: -1
    tvoc:
      name: "Atom2 TVOC"
      accuracy_decimals: -1
    baseline:
     eco2_baseline: 0x86C5
     tvoc_baseline: 0x8B38
    store_baseline: yes
    update_interval: 1s

This is the log

INFO Reading configuration /config/esphome/m5-atom2.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing m5-atom2 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
Library Manager: Installing Hash
INFO Installing Hash
Library Manager: Installing ESP8266WiFi
INFO Installing ESP8266WiFi
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 1.0
|-- FS @ 1.0
|-- Update @ 1.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 1.1.0
|-- ESPmDNS @ 1.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
|-- Wire @ 1.0.1
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/api_connection.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/api_server.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/list_entities.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/proto.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/subscribe_state.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/api/user_services.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/esp32/core.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/esp32/gpio_arduino.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/esp32/gpio_idf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/esp32/preferences.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/i2c/i2c.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/i2c/i2c_bus_arduino.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/i2c/i2c_bus_esp_idf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/logger/logger.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/md5/md5.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/mdns/mdns_component.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/mdns/mdns_esp_idf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/network/util.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/ota/ota_component.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/sensirion_common/i2c_sensirion.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/sensor/automation.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/sensor/filter.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/sensor/sensor.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/sgp30/sgp30.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/socket/socket.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/web_server_base/web_server_base.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/wifi/wifi_component.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/application.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/color.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/component.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/component_iterator.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/controller.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/entity_base.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/helpers.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/log.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/scheduler.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/esphome/core/util.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/src/main.cpp.o
Generating partitions /data/m5-atom2/.pioenvs/m5-atom2/partitions.bin
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdac/AsyncTCP-esphome/AsyncTCP.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/ETH.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFi.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiAP.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiClient.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/libdac/libAsyncTCP-esphome.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiGeneric.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiMulti.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiSTA.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiScan.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiServer.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib64d/WiFi/WiFiUdp.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib01c/FS/FS.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib01c/FS/vfs_api.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libbc6/Update/HttpsOTAUpdate.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib64d/libWiFi.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libbc6/Update/Updater.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/AsyncEventSource.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib01c/libFS.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/AsyncWebSocket.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/libbc6/libUpdate.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/WebHandlers.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/WebRequest.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/WebResponses.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/libdad/ESPAsyncWebServer-esphome/WebServer.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib333/DNSServer/DNSServer.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib333/libDNSServer.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib915/ESPmDNS/ESPmDNS.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_core/ed25519/core_ed25519.c.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/libdad/libESPAsyncWebServer-esphome.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_core/ed25519/core_ristretto255.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_hash/crypto_hash.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_hash/sha256/hash_sha256.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_onetimeauth/crypto_onetimeauth.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_scalarmult/crypto_scalarmult.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib915/libESPmDNS.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_stream/chacha20/stream_chacha20.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_stream/crypto_stream.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/crypto_verify/sodium/verify.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/sodium/codecs.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/sodium/core.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/sodium/runtime.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium/sodium/utils.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/openssl/cipher-aesgcm.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/cipher-aesgcm.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/cipher-chachapoly.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/dh-curve25519.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/hash-blake2b.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/hash-blake2s.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/ref/hash-sha256.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/sodium/cipher-aesgcm.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/sodium/cipher-chachapoly.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/sodium/dh-curve25519.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/sodium/hash-blake2b.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/backend/sodium/hash-sha256.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/aes/rijndael-alg-fst.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/blake2/blake2b.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/blake2/blake2s.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/chacha/chacha.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/donna/curve25519-donna-c64.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/donna/curve25519-donna.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/donna/poly1305-donna.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/sha2/sha256.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/sha2/sha512.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/crypto/x25519/x25519.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/cipherstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/dhstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/errors.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/handshakestate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/hashstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/internal.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/names.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/patterns.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/rand_os.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/rand_sodium.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/randstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/signstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/symmetricstate.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib026/noise-c/protocol/util.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/lib4fc/Wire/Wire.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib026/libnoise-c.a
Archiving /data/m5-atom2/.pioenvs/m5-atom2/libFrameworkArduinoVariant.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/Esp.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/FunctionalInterrupt.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib4fc/libWire.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/HardwareSerial.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/IPAddress.cpp.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/lib95c/libsodium.a
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/IPv6Address.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/MD5Builder.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/Print.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/Stream.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/StreamString.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/WMath.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/WString.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/base64.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/cbuf.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-adc.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-bt.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-cpu.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-dac.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-gpio.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-i2c.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-ledc.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-log.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-matrix.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-misc.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-psram.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-rmt.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-spi.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                        ^
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-time.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-timer.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-touch.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/esp32-hal-uart.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/libb64/cdecode.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/libb64/cencode.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/main.cpp.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/stdlib_noniso.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/wiring_pulse.c.o
Compiling /data/m5-atom2/.pioenvs/m5-atom2/FrameworkArduino/wiring_shift.c.o
Archiving /data/m5-atom2/.pioenvs/m5-atom2/libFrameworkArduino.a
Linking /data/m5-atom2/.pioenvs/m5-atom2/firmware.elf
RAM:   [=         ]  12.8% (used 42004 bytes from 327680 bytes)
Flash: [=====     ]  54.4% (used 997690 bytes from 1835008 bytes)
Building /data/m5-atom2/.pioenvs/m5-atom2/firmware.bin
esp32_create_combined_bin(["/data/m5-atom2/.pioenvs/m5-atom2/firmware.bin"], ["/data/m5-atom2/.pioenvs/m5-atom2/firmware.elf"])
Wrote 0x1039a0 bytes to file /data/m5-atom2/.pioenvs/m5-atom2/firmware-factory.bin, ready to flash to offset 0x0
======================== [SUCCESS] Took 146.49 seconds ========================
INFO Installing Hash
INFO Installing ESP8266WiFi
INFO Successfully compiled program.
INFO Resolving IP address of m5-atom2.local
INFO  -> xxx
INFO Uploading /data/m5-atom2/.pioenvs/m5-atom2/firmware.bin (997792 bytes)
Uploading: [============================================================] 100% Done...

INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from m5-atom2.local using esphome API
INFO Successfully connected to m5-atom2.local
[21:03:11][I][app:102]: ESPHome version 2022.10.2 compiled on Nov  7 2022, 21:01:14
[21:03:11][C][wifi:502]: WiFi:
[21:03:11][C][wifi:360]:   Local MAC: 4C:75:25:94:CA:80
[21:03:11][C][wifi:361]:   SSID: xxx
[21:03:11][C][wifi:362]:   IP Address: 192.xxx
[21:03:11][C][wifi:364]:   BSSID: 08:96:D7:1F:55:16[redacted]
[21:03:11][C][wifi:365]:   Hostname: 'm5-atom2'
[21:03:11][C][wifi:367]:   Signal strength: -47 dB ▂▄▆█
[21:03:11][C][wifi:371]:   Channel: 11
[21:03:11][C][wifi:372]:   Subnet: 255.255.255.0
[21:03:11][C][wifi:373]:   Gateway: 192.xxx
[21:03:11][C][wifi:374]:   DNS1: 192.xxx
[21:03:11][C][wifi:375]:   DNS2: 0.0.0.0
[21:03:11][C][logger:275]: Logger:
[21:03:11][C][logger:276]:   Level: DEBUG
[21:03:11][C][logger:277]:   Log Baud Rate: 115200
[21:03:11][C][logger:278]:   Hardware UART: UART0
[21:03:11][C][i2c.arduino:038]: I2C Bus:
[21:03:11][C][i2c.arduino:039]:   SDA Pin: GPIO25
[21:03:11][C][i2c.arduino:040]:   SCL Pin: GPIO21
[21:03:11][C][i2c.arduino:041]:   Frequency: 50000 Hz
[21:03:11][C][i2c.arduino:044]:   Recovery: bus successfully recovered
[21:03:11][I][i2c.arduino:054]: Results from i2c bus scan:
[21:03:11][I][i2c.arduino:056]: Found no i2c devices!
[21:03:11][C][i2c.arduino:038]: I2C Bus:
[21:03:11][C][i2c.arduino:039]:   SDA Pin: GPIO26
[21:03:11][C][i2c.arduino:040]:   SCL Pin: GPIO32
[21:03:11][C][i2c.arduino:041]:   Frequency: 50000 Hz
[21:03:12][C][i2c.arduino:044]:   Recovery: bus successfully recovered
[21:03:12][I][i2c.arduino:054]: Results from i2c bus scan:
[21:03:12][I][i2c.arduino:056]: Found no i2c devices!
[21:03:12][C][sgp30:220]: SGP30:
[21:03:12][C][sgp30:221]:   Address: 0x58
[21:03:12][W][sgp30:237]: Unknown setup error!
[21:03:12][C][sgp30:251]:   Update Interval: 1.0s
[21:03:12][C][sgp30:252]:   eCO2 sensor 'Matrix eCO2'
[21:03:12][C][sgp30:252]:     Device Class: 'carbon_dioxide'
[21:03:12][C][sgp30:252]:     State Class: 'measurement'
[21:03:12][C][sgp30:252]:     Unit of Measurement: 'ppm'
[21:03:12][C][sgp30:252]:     Accuracy Decimals: -1
[21:03:12][C][sgp30:252]:     Icon: 'mdi:molecule-co2'
[21:03:12][C][sgp30:253]:   TVOC sensor 'Matrix TVOC'
[21:03:12][C][sgp30:253]:     Device Class: 'volatile_organic_compounds'
[21:03:12][C][sgp30:253]:     State Class: 'measurement'
[21:03:12][C][sgp30:253]:     Unit of Measurement: 'ppb'
[21:03:12][C][sgp30:253]:     Accuracy Decimals: -1
[21:03:12][C][sgp30:253]:     Icon: 'mdi:radiator'
[21:03:12][C][sgp30:256]: Store baseline: YES
[21:03:12][C][sgp30:262]:   Compensation: No source configured
[21:03:12][C][captive_portal:088]: Captive Portal:
[21:03:12][C][mdns:100]: mDNS:
[21:03:12][C][mdns:101]:   Hostname: m5-atom2
[21:03:12][C][ota:089]: Over-The-Air Updates:
[21:03:12][C][ota:090]:   Address: m5-atom2.local:3232
[21:03:12][C][ota:093]:   Using Password.
[21:03:12][C][api:138]: API Server:
[21:03:12][C][api:139]:   Address: m5-atom2.local:6053
[21:03:12][C][api:141]:   Using noise encryption: YES
[21:03:23][D][api:102]: Accepted ::FFFF:C0A8:B22A
[21:03:24][W][api.connection:071]: ::FFFF:C0A8:B22A: Socket operation failed: BAD_INDICATOR errno=11

Did you ever figure this out?

I can get the SGP30 to work with n Arduino Sketch but not in ESPHome on an M5 Core 2.

Here is the sketch

#include <M5Core2.h>

//SGP30 needs 15 seconds to initialize calibration after power on.
//The screen will display TVOC and CO2


#include "Adafruit_SGP30.h"

Adafruit_SGP30 sgp;
int i = 15;
long last_millis = 0;
void header(const char *string, uint16_t color)
{
    M5.Lcd.fillScreen(color);
    M5.Lcd.setTextSize(1);
    M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
    M5.Lcd.fillRect(0, 0, 320, 30, TFT_BLACK);
    M5.Lcd.setTextDatum(TC_DATUM);
    M5.Lcd.drawString(string, 160, 3, 4); 
}



void setup() {
  M5.begin(true, false, true, true);
  header("SGP30 TEST",TFT_BLACK);
  Serial.println("SGP30 test");
  if (! sgp.begin()){
    Serial.println("Sensor not found :(");
    while (1);
  }
  
  M5.Lcd.drawString("TVOC:", 50, 40, 4);
  M5.Lcd.drawString("eCO2:", 50, 80, 4);
  Serial.print("Found SGP30 serial #");
  Serial.print(sgp.serialnumber[0], HEX);
  Serial.print(sgp.serialnumber[1], HEX);
  Serial.println(sgp.serialnumber[2], HEX);
  M5.Lcd.drawString("Initialization...", 140, 120, 4);
}

void loop() {
  while(i > 0) {    
    if(millis()- last_millis > 1000) {
      last_millis = millis();
      i--;
      M5.Lcd.fillRect(198, 120, 40, 20, TFT_BLACK);
      M5.Lcd.drawNumber(i, 20, 120, 4);
    }
  }
  M5.Lcd.fillRect(0, 120, 300, 30, TFT_BLACK);

  if (! sgp.IAQmeasure()) {
    Serial.println("Measurement failed");
    return;
  }
  M5.Lcd.fillRect(100, 40, 220, 90, TFT_BLACK);
  M5.Lcd.drawNumber(sgp.TVOC, 120, 40 , 4);
  M5.Lcd.drawString("ppb", 200, 40, 4);
  M5.Lcd.drawNumber(sgp.eCO2, 120, 80, 4);
  M5.Lcd.drawString("ppm", 200, 80, 4);
  Serial.print("TVOC "); Serial.print(sgp.TVOC); Serial.print(" ppb\t");
  Serial.print("eCO2 "); Serial.print(sgp.eCO2); Serial.println(" ppm");
 
  delay(1000);
}

In ESPHome I get this

[11:10:34][C][i2c.arduino:052]: I2C Bus:
[11:10:34][C][i2c.arduino:053]:   SDA Pin: GPIO21
[11:10:34][C][i2c.arduino:054]:   SCL Pin: GPIO22
[11:10:34][C][i2c.arduino:055]:   Frequency: 400000 Hz
[11:10:34][C][i2c.arduino:058]:   Recovery: bus successfully recovered
[11:10:34][I][i2c.arduino:068]: Results from i2c bus scan:
[11:10:34][I][i2c.arduino:074]: Found i2c device at address 0x34
[11:10:34][I][i2c.arduino:074]: Found i2c device at address 0x51
[11:10:34][I][i2c.arduino:074]: Found i2c device at address 0x68
[11:10:34][C][sgp30:220]: SGP30:
[11:10:34][C][sgp30:221]:   Address: 0x58
[11:10:34][W][sgp30:237]: Unknown setup error!
[11:10:34][C][sgp30:251]:   Update Interval: 3.0s
[11:10:34][C][sgp30:252]:   eCO2 sensor 'eCO2'
[11:10:34][C][sgp30:252]:     Device Class: 'carbon_dioxide'
[11:10:34][C][sgp30:252]:     State Class: 'measurement'
[11:10:34][C][sgp30:252]:     Unit of Measurement: 'ppm'
[11:10:34][C][sgp30:252]:     Accuracy Decimals: 1
[11:10:34][C][sgp30:252]:     Icon: 'mdi:molecule-co2'
[11:10:34][C][sgp30:253]:   TVOC sensor 'TVOC'
[11:10:34][C][sgp30:253]:     Device Class: 'volatile_organic_compounds'
[11:10:34][C][sgp30:253]:     State Class: 'measurement'
[11:10:34][C][sgp30:253]:     Unit of Measurement: 'ppb'
[11:10:34][C][sgp30:253]:     Accuracy Decimals: 1
[11:10:34][C][sgp30:253]:     Icon: 'mdi:radiator'

Here is my yaml

esphome:
  name: "esphome-m5stack-core-1"

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  
# Enable Home Assistant API
api:

ota:


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

  

captive_portal:



spi:
  clk_pin: 18
  mosi_pin: 23
  miso_pin: 38

i2c:
  - id: bus_a
    sda: 21
    scl: 22
    scan: true
    frequency: 400 kHz

 
sensor:
 
  - platform: sgp30
    i2c_id: bus_a
    eco2:
      name: "eCO2"
      accuracy_decimals: 1
      id: eco2
    tvoc:
      name: "TVOC"
      accuracy_decimals: 1
      id: tvoc
    update_interval: 3s
    baseline:
      eco2_baseline: 0x92B7
      tvoc_baseline: 0x935A