esphome:
  name: co2-esp32-zero-mini
  friendly_name: CO2-ESP32-Zero-Mini
esp32:
  variant: ESP32C3
  framework:
    type: arduino

web_server:
  port: 80
  auth:
    username: !secret web_server_username
    password: !secret web_server_password

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_username
  password: !secret mqtt_password

captive_portal:
  id: CO2
  compression: gzip

logger:

api:
  encryption:
    key: !secret api_encryption_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: CO2-ESP32-Zero- Fallback Hotspot
    password: !secret ap_password

uart:
  rx_pin: GPIO20
  tx_pin: GPIO21
  baud_rate: 9600

sensor:
  - platform: mhz19
    co2:
      id: co2val
      name: MH-Z19 Temperature
      icon: "mdi:molecule-co2"
    update_interval: 60s
    automatic_baseline_calibration: false
    id: sens1
    temperature:
      name: Temperature
      icon: "mdi:temperature-celsius"

switch:
  - platform: restart
    name: ${upper_devicename} Restart
    icon: "mdi:restart"
    device_class: switch
