esphome: name: name friendly_name: Name # Boot sequence - start with WiFi connecting effect on_boot: - priority: 600 then: - logger.log: "Device booting, starting WiFi connection" - light.turn_on: id: status_led effect: "wifi_connecting" esp32: board: esp32-s3-devkitc-1 framework: type: esp-idf sdkconfig_options: CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y" CONFIG_ESP32S3_DATA_CACHE_64KB: "y" CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y" CONFIG_AUDIO_BOARD_CUSTOM: "y" psram: mode: octal speed: 80MHz # Enable logging logger: # Enable Home Assistant API api: encryption: key: "ZGLTCJYjvXIJA0LIP8o/k9Vp+Tia9AhHgXZ/WHCQ1gQ=" # API connection event handlers on_client_connected: - logger.log: "Home Assistant API connected" - light.turn_off: status_led on_client_disconnected: - logger.log: "Home Assistant API disconnected" - light.turn_on: id: status_led effect: "ha_connecting" # Allow Over-The-Air updates ota: - platform: esphome password: !secret ota_password wifi: ssid: !secret wifi_ssid password: !secret wifi_password # WiFi connection event handlers on_connect: - logger.log: "WiFi connected, attempting Home Assistant connection" - light.turn_on: id: status_led effect: "ha_connecting" on_disconnect: - logger.log: "WiFi disconnected" - light.turn_on: id: status_led effect: "wifi_connecting" # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Living-Room-Sensor Hotspot" password: !secret ota_password # Status LED configuration light: - platform: esp32_rmt_led_strip id: status_led name: "Status LED" pin: GPIO48 num_leds: 1 chipset: ws2812 rgb_order: GRB effects: # Yellow blinking during WiFi connection - strobe: name: "wifi_connecting" colors: - state: true brightness: 80% red: 100% green: 100% blue: 0% duration: 500ms - state: false duration: 500ms # Orange blinking during Home Assistant connection - strobe: name: "ha_connecting" colors: - state: true brightness: 80% red: 100% green: 65% blue: 0% duration: 300ms - state: false duration: 300ms button: - platform: restart name: "Restart Sensor" id: restart_button