mirror of
https://github.com/esphome/esphome.git
synced 2026-10-03 01:35:59 +00:00
[speaker] Use register_apply_action for the speaker actions (#19535)
This commit is contained in:
@@ -30,3 +30,8 @@ script:
|
||||
id: speaker_media_player_id
|
||||
media_file: speaker_test_audio
|
||||
announcement: true
|
||||
- media_player.speaker.play_on_device_media_file:
|
||||
id: speaker_media_player_id
|
||||
media_file: speaker_test_audio
|
||||
announcement: !lambda return id(speaker_my_number).state > 50;
|
||||
enqueue: !lambda return id(speaker_my_number).state < 50;
|
||||
|
||||
@@ -25,6 +25,9 @@ esphome:
|
||||
- speaker.volume_set:
|
||||
id: speaker_id
|
||||
volume: 0.9
|
||||
- speaker.volume_set:
|
||||
id: speaker_id
|
||||
volume: !lambda return id(speaker_my_number).state / 100.0f;
|
||||
- if:
|
||||
condition:
|
||||
speaker.is_playing:
|
||||
|
||||
Reference in New Issue
Block a user