Implement the finish() method and action. implement the is_stopped condition (#7255)
This commit is contained in:
1 parent
d6f130e35a
commit
cf6ea7cb2c
9 files changed
+77
-15
No files matched your search
@@ -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