Hi , i am quite new to HA and i would like to ask for help from the experts
I would like to create a button which starts my Sonos speaker playing radio, with a selected volume and a sleeptimer for a amount of time.
So far so good, when i look at my automations there is a automation, but only when i press the “trigger” button it works. The slider doesn’t have any effect and doesn’t start anything.
Is it possible to create a button which starts my automation ? ( Maybe something with boolean ? )
I have used this script :
alias: NPO Radio 2 sleeptimer 30 min
trigger:
- entity_id: media_player.boven
from: Paused
platform: state
to: Playing
condition: []
action:
- service: media_player.media_play_pause
- service: media_player.sonos_set_sleep_timer
data_template:
entity_id: media_player.boven
sleep_time: 1800
- service: media_player.volume_set
data_template:
entity_id: media_player.boven
volume_level: 0.08
- service: media_player.select_source
data_template:
entity_id: media_player.boven
source: NPO Radio 2