Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: esphome-web-619cd4
- friendly_name: xiaozhi cube
- min_version: 2025.5.0
- name_add_mac_suffix: false
- esp32:
- board: esp32-s3-devkitc-1
- flash_size: 16MB
- cpu_frequency: 240MHz
- 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"
- psram:
- mode: octal
- speed: 80MHz
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- # Allow Over-The-Air updates
- ota:
- - platform: esphome
- wifi:
- ap: {}
- captive_portal:
- #button on the back left
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIO0 # BOOT button
- inverted: true
- mode:
- input: true
- pullup: true
- name: Assist Button
- disabled_by_default: false
- id: button
- #speaker and microphone
- i2s_audio:
- - id: i2s # microphone
- i2s_lrclk_pin: GPIO4 #WS pin
- i2s_bclk_pin: GPIO5 #SCK pin
- - id: speaker_i2s # speaker
- i2s_lrclk_pin: GPIO16 # LRC pin
- i2s_bclk_pin: GPIO15 # BCLK pin
- microphone:
- - platform: i2s_audio
- i2s_audio_id: i2s
- adc_type: external
- i2s_din_pin: GPIO6 #SD pin
- id: va_mic
- speaker:
- platform: i2s_audio
- id: va_speaker
- i2s_audio_id: i2s
- dac_type: external
- i2s_dout_pin:
- number: GPIO7 # DIN Pin
- media_player:
- - platform: speaker
- name: None
- announcement_pipeline:
- speaker: va_speaker
- format: WAV
- volume_min: 0.4
- # onboard LED
- light:
- - platform: esp32_rmt_led_strip
- id: led
- name: none
- disabled_by_default: false
- entity_category: config
- pin: GPIO48
- default_transition_length: 0s
- chipset: WS2812
- num_leds: 1
- rgb_order: grb
- effects:
- - pulse:
- name: "Slow Pulse"
- transition_length: 250ms
- update_interval: 250ms
- min_brightness: 50%
- max_brightness: 100%
- - pulse:
- name: "Fast Pulse"
- transition_length: 100ms
- update_interval: 100ms
- min_brightness: 50%
- max_brightness: 100%
- # display
- time:
- - platform: homeassistant
- id: homeassistant_time
- spi:
- clk_pin: GPIO14 # SCL pin
- mosi_pin: GPIO17 # SDA pin
- interface: hardware
- id: spihwd
- font:
- - file: "gfonts://Roboto"
- id: my_font
- size: 28
- - file: "gfonts://Roboto"
- id: roboto_52
- size: 52
- image:
- - file: images/ow480x480.jpg
- id: my_image
- resize: 240x240
- type: RGB
- display:
- - platform: ili9xxx
- invert_colors: true
- model: GC9A01A
- rotation: 0
- reset_pin: GPIO18 # RST pin
- cs_pin: GPIO13 # CS pin
- dc_pin: GPIO10 # DC pin
- lambda: |-
- auto red = Color(255,0,0), green = Color(0,255,0), blue = Color(0,0,255), yellow = Color(255,255,0), white = Color(255,255, 255), cyberlightgreen = Color(0,255,159), cyberlightblue = Color(0,184,255), cyberpink = Color(214,0,255);
- it.image(0, 0, id(my_image));
- it.strftime(120, 120, id(roboto_52), cyberlightgreen, TextAlign::CENTER, "%H:%M:%S", id(homeassistant_time).now());
Advertisement
Add Comment
Please, Sign In to add comment