How do I take the value of an input_number entity that is called “input_number.alarm_siren_volume” and apply it to a currently running piece of media started by a script. Does this require another script? Or can this be done inside of the below somehow?
notification_security_alarm_audio:
sequence:
- service: media_player.volume_set
data_template:
entity_id: media_player.everywhere_inside_except_tvs
volume_level: {{ states('input_number.alarm_siren_volume') | float }}
- repeat:
until:
- condition: state
entity_id: alarm_control_panel.alarmo
state: disarmed
sequence: []
- service: media_player.play_media
entity_id: media_player.everywhere_inside_except_tvs
data:
media_content_id: http://192.168.1.25:8123/local/media/sounds/siren.mp3
media_content_type: music
- wait_template: '{{ is_state("media_player.everywhere_inside_except_tvs", "idle") or is_state("media_player.everywhere_inside_except_tvs", "off") }}'
continue_on_timeout: true