I have set up an Aqara button / ZHA automation that with a single press will play a radio station for 30 seconds then stop (see yaml below) - and it works as expected. But if after a few minutes of silence I press the button once again, nothing happens - unless I go back in and change the radio station within the automation first. I tried changing the final service: media_player.media_stop
to service: media_player.media_pause
but that didn’t help.
Any ideas as to where I am going wrong?
TIA
alias: Aqara Zigbee Button Music
description: ""
use_blueprint:
path: apollo1220/aqara_zigbee_button.yaml
input:
button_id: a3f9cbb24f18b9a67de18761c8e44a86
press_action:
- service: media_player.play_media
target:
entity_id: media_player.sitting_room
data:
media_content_id: "59:0"
media_content_type: track
metadata:
title: BBC Radio 4 (London, UK FM 93.5 English)
thumbnail: >-
http://192.168.2.103:9330/api/image/afd611ddf80b5dce68aa13b8e9e99aff8bf23d351d0918d67f032e52c91c6dc24882ed6107bcb78f714d78cf03afae00bc229db4b9cf8f60651267fade0ef77743277e9d6b9cc1a02b31ceb2c964915e4716542f56b804f4ecbb5415cccf009ce1b807f055c2a182a450403dbdbaa048?scale=fit&width=500&height=500
media_class: track
children_media_class: null
navigateIds:
- {}
- media_content_type: library
media_content_id: "56:2"
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: media_player.media_pause
data: {}
target:
entity_id: media_player.sitting_room
double_press_action: []