State Attribute as value for Entity ID

Hi there - I’m new to templating but am trying to pass the data from an attribute in a sensor as the “entity ID” in a service. Here’s what I have so far:

service: google_home.delete_alarm
  skip_refresh: false
  entity_id: "{{ state_attr('sensor.bedroom_speaker_alarms', 'alarms')[0]['alarm_id'] }}"

I’m trying to pass the alarm_id into the service function. In the developer tools this spits out a value for the alarm_id but when executing the service, nothing happens. When pasting the actual alarm_id into the service, it executes perfectly.

I’m hoping it’s templating syntax, would appreciate any help on sorting through this!

What does this return in the template editor:

{{ state_attr('sensor.bedroom_speaker_alarms', 'alarms') }}

User error on this one - it’s the wrong input. Changed that and it worked, sorry y’all!