substitutions:
i2s_lrclk: GPIO1 # LRC Pin of the Max98357
i2s_bclk: GPIO42 # BCLK Pin of the Max98357
spk: GPIO2 # DIN Pin of the Max98357
i2s_audio:
- id: i2s_in
i2s_lrclk_pin: ${i2s_lrclk} # LRC Pin of the Max98357
i2s_bclk_pin: ${i2s_bclk} # BCLK Pin of the Max98357
media_player:
- platform: i2s_audio
name: "Lilka Speaker"
id: media_player_speaker
i2s_audio_id: i2s_in
dac_type: external
i2s_dout_pin: ${spk} # DIN Pin of the MAX98357A Audio Amplifier
mode: mono
on_play:
- logger.log: "Media playing!"
- media_player.volume_set:
id: media_player_speaker
volume: 100%