mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Implement the finish() method and action. implement the is_stopped condition (#7255)
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 16
|
||||
|
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 6
|
||||
|
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 6
|
||||
|
@@ -1,8 +1,15 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- speaker.stop
|
||||
- if:
|
||||
condition: speaker.is_stopped
|
||||
then:
|
||||
- speaker.play: [0, 1, 2, 3]
|
||||
- if:
|
||||
condition: speaker.is_playing
|
||||
then:
|
||||
- speaker.finish:
|
||||
- speaker.stop:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 16
|
||||
|
Reference in New Issue
Block a user