How to use template values in REST sensor payload?

Similar issue here: I simply don’t find a way to get the resource_template working.
Also customizing the input to be hidden seems to have no effect (homeassistant os)

input_text:
  secret_owm_apikey:
    initial: !secret owm_apikey
    mode: password

homeassistant:
  customize:
    input_text.secret_owm_apikey:
      hidden: true
resource_template: https://api.openweathermap.org/data/2.5/onecall?lat={{ state_attr("zone.home","latitude") }}&lon={{ state_attr("zone.home","longitude") }}&lang=de&units=metric&exclude=minutely&appid={{ states("input_text.secret_owm_apikey") }}

The expression evaluates fine with the template editor in the ui