Skip to main content
ESPHome and ESP32-C2

The marriage of Espressif ESP32-C2 (also known as ESP8684) and ESPHome has arrived.

With a minor limitation of MDNS not functioning and only 2 MB of flash storage, the device is functional enough for basic input, output and sensors.

Here is an example ESPHome configuration YAML file.  It is for the ESPC2-01 module with a status LED and HTU21D temperature and humidity sensor connected via I2C.

esphome:
  name: esp32c2-ewan-cc
  platformio_options:
    platform:
      - https://github.com/ewpa/platform-espressif32.git#esp32c2
    platform_packages:
      - framework-espidf @ 3.50301.0

esp32:
  board: espc2-01
  variant: esp32c2
  flash_size: 2MB
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_XTAL_FREQ_26: "y"

# Enable logging
logger:
  #baud_rate: 74880

# MDNS FTBFS for ESP32C2.
mdns:
  disabled: true

# Enable Home Assistant API
api:
  encryption:
    key: "O4f+6UzMQkXuQRG/aEhC8KpKk85ZmSUCsq8LqG6W3Ao="

ota:
  - platform: esphome
    password: "8ac0b27edb24875bc288f6953a09620a"

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

light:
  - platform: status_led
    name: "LED"
    pin:
      number: 2
      inverted: true

i2c:
  sda: 3
  scl: 9
  frequency: 800kHz
  scan: true
  id: bus_a

sensor:
  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 60s

  - platform: htu21d
    temperature:
      id: temperature
      name: "Temperature"
    humidity:
      id: humidity
      name: "Humidity"
    update_interval: 60s