Add additional speaker lambda tests (#11797)

This commit is contained in:
J. Nick Koston
2025-11-09 16:15:50 -06:00
committed by GitHub
parent e468ca4881
commit 5585355263

View File

@@ -1,3 +1,12 @@
number:
- platform: template
name: "Speaker Number"
id: my_number
optimistic: true
min_value: 0
max_value: 100
step: 1
esphome:
on_boot:
then:
@@ -14,6 +23,15 @@ esphome:
- speaker.finish:
- speaker.stop:
button:
- platform: template
name: "Speaker Button"
on_press:
then:
- speaker.play: [0x10, 0x20, 0x30, 0x40]
- speaker.play: !lambda |-
return {0x01, 0x02, (uint8_t)id(my_number).state};
i2s_audio:
i2s_lrclk_pin: ${i2s_bclk_pin}
i2s_bclk_pin: ${i2s_lrclk_pin}