1
0
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:
NP v/d Spek
2024-08-14 05:42:43 +02:00
committed by GitHub
parent d6f130e35a
commit cf6ea7cb2c
9 changed files with 77 additions and 15 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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