Add additional speaker lambda tests (#11797)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user