Dynamic URL with resource_template & input.select helpers

Trying to understand why I can’t use my input.select helper in my resouce_template url. I’ve tested in the dev tools template, and it looks to be correct. My initial thought is that the sensor gets built before the helper does on boot up, so the url doesn’t work?

Still a relative n00b, but I haven’t found anything quite like this in community. I’ve gone through the docs as well, but nothing caught my eye.

I’m trying to use the input_select helper on a dashboard, to alter the endpoint of the api call to get bus route information for the selected route. I understand that I may have to reload config, which is fine. It’s not meant to be changed frequently on the fly, but rather a more simple way to alter the endpoint if needed.

I just can’t figure out where I’m going wrong.

- platform: rest
  name: Route Info
  unique_id: info_by_route
  method: GET
  scan_interval: 15 #number of seconds  
#resource: https://www3.septa.org/api/TransitView/index.php?route=7
  resource_template: "https://www3.septa.org/api/TransitView/index.php?route='{{ states('input_select.septa_route_helper') }}"
  value_template: "{{ states('input_select.septa_route_helper') }}"
  json_attributes_path: $.bus[0]
  json_attributes:
    - VehicleID
    - next_stop_id
    - next_stop_name
    - Direction
    - route_id

Figured it out, like a dummy I forgot to make sure the input_select helper was an integer

resource_template: "https://www3.septa.org/api/TransitView/index.php?route={{ states('input_select.septa_route_helper') | int(0)}}"