@@ -66,11 +66,11 @@ speaker:
6666 buffer_duration : 100ms
6767
6868output :
69- - platform : gpio
70- pin :
71- number : GPIO21
72- inverted : true
73- id : mute_pin
69+ - platform : gpio
70+ pin :
71+ number : GPIO21
72+ inverted : true
73+ id : mute_pin
7474
7575media_player :
7676 - platform : speaker
@@ -300,24 +300,24 @@ switch:
300300 on_turn_off :
301301 # Turn off the repeat mode and disable the pause between playlist items
302302 - lambda : |-
303- id(muse_media_player)
304- ->make_call()
305- .set_command(media_player::MediaPlayerCommand::MEDIA_PLAYER_COMMAND_REPEAT_OFF)
306- .set_announcement(true)
307- .perform();
308- id(muse_media_player)->set_playlist_delay_ms(speaker::AudioPipelineType::ANNOUNCEMENT, 0);
303+ id(muse_media_player)
304+ ->make_call()
305+ .set_command(media_player::MediaPlayerCommand::MEDIA_PLAYER_COMMAND_REPEAT_OFF)
306+ .set_announcement(true)
307+ .perform();
308+ id(muse_media_player)->set_playlist_delay_ms(speaker::AudioPipelineType::ANNOUNCEMENT, 0);
309309 # Stop playing the alarm
310310 - media_player.stop :
311311 announcement : true
312312 on_turn_on :
313313 # Turn on the repeat mode and pause for 1000 ms between playlist items/repeats
314314 - lambda : |-
315- id(muse_media_player)
316- ->make_call()
317- .set_command(media_player::MediaPlayerCommand::MEDIA_PLAYER_COMMAND_REPEAT_ONE)
318- .set_announcement(true)
319- .perform();
320- id(muse_media_player)->set_playlist_delay_ms(speaker::AudioPipelineType::ANNOUNCEMENT, 1000);
315+ id(muse_media_player)
316+ ->make_call()
317+ .set_command(media_player::MediaPlayerCommand::MEDIA_PLAYER_COMMAND_REPEAT_ONE)
318+ .set_announcement(true)
319+ .perform();
320+ id(muse_media_player)->set_playlist_delay_ms(speaker::AudioPipelineType::ANNOUNCEMENT, 1000);
321321 - media_player.speaker.play_on_device_media_file :
322322 media_file : timer_finished_sound
323323 announcement : true
@@ -331,14 +331,14 @@ switch:
331331 restore_mode : RESTORE_DEFAULT_ON
332332 turn_on_action :
333333 then :
334- - lambda : |-
335- gpio_reset_pin(GPIO_NUM_23);
336- gpio_set_direction(GPIO_NUM_23, GPIO_MODE_OUTPUT);
337- gpio_set_pull_mode(GPIO_NUM_23, GPIO_PULLDOWN_ONLY);
334+ - lambda : |-
335+ gpio_reset_pin(GPIO_NUM_23);
336+ gpio_set_direction(GPIO_NUM_23, GPIO_MODE_OUTPUT);
337+ gpio_set_pull_mode(GPIO_NUM_23, GPIO_PULLDOWN_ONLY);
338338 turn_off_action :
339339 then :
340- - lambda : |-
341- gpio_reset_pin(GPIO_NUM_23);
340+ - lambda : |-
341+ gpio_reset_pin(GPIO_NUM_23);
342342
343343select :
344344 - platform : template
0 commit comments