nene1234

lilka sound compiling (not work in ha)

Nov 17th, 2025 (edited)
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.33 KB | None | 0 0
  1. esphome:
  2.   name: lilka
  3.   friendly_name: lilka
  4.   on_boot:
  5.     priority: 600
  6.     then:
  7.       - output.turn_on: display_power
  8.       - delay: 100ms
  9.  
  10. esp32:
  11.   board: esp32-s3-devkitc-1
  12.   framework:
  13.     type: arduino
  14.  
  15. wifi:
  16.   ssid: !secret wifi_ssid
  17.   password: !secret wifi_password
  18.   ap:
  19.     ssid: "Lilka Fallback Hotspot"
  20.     password: "hnYImYM4O6I0"
  21.  
  22. captive_portal:
  23. web_server:
  24.   port: 80
  25.  
  26. api:
  27.   encryption:
  28.     key: "Yw3yq8lxsaze+jdggjAwxKpV4GD6gNZptvw4d6OPfOc="
  29.  
  30. logger:
  31. ota:
  32.   - platform: esphome
  33.     password: "bb198feb99159fdaefc8092f10039acd"
  34.  
  35. output:
  36.   - platform: gpio
  37.     pin: 46
  38.     id: display_power
  39.     inverted: false
  40.  
  41. substitutions:
  42.   i2s_lrclk: GPIO1  # LRC Pin of the Max98357
  43.   i2s_bclk: GPIO42  # BCLK Pin of the Max98357
  44.   spk: GPIO2       # DIN Pin of the Max98357
  45.  
  46. i2s_audio:
  47.   - id: i2s_in
  48.     i2s_lrclk_pin: ${i2s_lrclk} # LRC Pin of the Max98357
  49.     i2s_bclk_pin: ${i2s_bclk}   # BCLK Pin of the Max98357
  50.  
  51. media_player:
  52.   - platform: i2s_audio
  53.     name: "Lilka Speaker"
  54.     id: media_player_speaker
  55.     i2s_audio_id: i2s_in
  56.     dac_type: external
  57.     i2s_dout_pin: ${spk}    # DIN Pin of the MAX98357A Audio Amplifier
  58.     mode: mono
  59.     on_play:
  60.       - logger.log: "Media playing!"
  61.       - media_player.volume_set:
  62.           id: media_player_speaker
  63.           volume: 100%
Advertisement
Add Comment
Please, Sign In to add comment