How to reference template in URL?

How can I accomplish referencing a template value in a tap action url?

Specifically I am using a mealie card as discussed here.

Here is the card:

show_state: true
show_name: true
camera_view: auto
type: picture-entity
entity: sensor.mealie_todays_meal
name: Dinner Tonight
camera_image: camera.camera_mealie_todays_meal_image
tap_action:
  action: url
  url_path: '[[[ return states["sensor.mealie_todays_meal_navigation_url"].state; ]]]'
card_mod:
  style: |
    ha-card {
    max-height: 100px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    }

I want the tap action to open the browser to my mealie application at the correct meal. This means I need my sensor.mealie_todays_meal_navigation_url to be referenced, which basically takes the url of my self hosted mealie instance and appends the correctly formatted recipe to the url.

I have a markdown card correctly using this link functionality right now, but I MUCH prefer the picture to be the background and to look like the card does above.

Here is that working markdown card for reference (pulled from this topic

type: markdown
content: |
  ## Dinner
  {% set url = states('sensor.mealie_todays_meal_navigation_url') %}
  {% set dinnerName = states('sensor.mealie_todays_meal') %}
  ## [{{dinnerName}}]({{url}})

And lastly, here is a visual of the two cards. The markdown at the top and the camera entity at the bottom. The camera entity card is perfect except I can’t get the tap_action to work.

Screenshot 2024-02-21 at 3.11.45 PM

Update: I got this working using config-template-card

Here is my card for your reference:

type: custom:config-template-card
variables:
  meal_url: states['sensor.mealie_todays_meal_navigation_url'].state
entities:
  - sensor.mealie_todays_meal
card:
  type: picture-entity
  entity: sensor.mealie_todays_meal
  name: Dinner Tonight
  camera_image: camera.camera_mealie_todays_meal_image
  show_state: true
  show_name: true
  camera_view: auto
  tap_action:
    action: url
    url_path: ${meal_url}
  card_mod:
    style: |
      ha-card {
      max-height: 100px !important;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      }

Can you see the camera updates real-time here, w/o refreshing a page?
Asking since you got this camera entity inside config-template-card (CTC) - and have not defined the entity as “monitored”.

No, this isn’t a camera. It’s a static image that get’s pulled from mealie