

# Classic ESP32 (WROOM-32). Its pin numbering has nothing in common with the
# C3/S3 boards, so a XIAO pin map cannot be copied across: GPIO6-11 are the
# SPI flash, GPIO34-39 are input-only, GPIO0/2/12/15 are strapping pins and
# GPIO1/3 are the UART0 console. These are the standard VSPI assignments.
substitutions:
  # Pins for the SPI bus used to drive the display
  clk_pin: "GPIO18"    # VSPI SCK
  mosi_pin: "GPIO23"   # VSPI MOSI
  miso_pin: "GPIO19"   # VSPI MISO - only a microSD would need it
  # Pins for the display itself
  reset_pin: "GPIO22"
  cs_pin: "GPIO4"      # VSPI CS - a strapping pin, but CS idles high anyway
  dc_pin: "GPIO21"

esp32:
  board: esp32dev
  framework:
    type: esp-idf

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

api:
  encryption:
    key: !secret api_key
ota:
  - platform: esphome
    password: !secret ota_password

external_components:
  - source: ../components
    components: [lvgl_clock]

time:
  - platform: sntp
    id: clock_time
    timezone: "CET-1CEST,M3.5.0,M10.5.0/3"

# marker only - enables the lvgl_clock widget, takes no options itself.
lvgl_clock:

# Shared colour palette for the lvgl_clock example_*.yaml configs.

color:
  - id: cc_hands
    red: 100%
    green: 100%
    blue: 100%
  - id: cc_bg
    red: 0%
    green: 0%
    blue: 0%
  - id: cc_faces  # unlit "ghost" segments / little-clock faces
    red: 12%
    green: 12%
    blue: 14%