Can not use input_text helper to hold URL

Webpage Card with input_text
Hello,
I am trying to display a webpage in one of my dashboards using the webpage Lovelace card. The webpage is a recipe and I will need to have an easy way to change the website regularly. I was planning to create a input_text helper to hold the url and then I could just update the value of the input_text helper with automations to change the webpage being displayed.

However the webpage card gets stuck on the loading screen forever. If I paste the URL directly into the card it works fine. Any idea on how to get this to work? Or alternative solutions to easily update the webpage url being displayed?

Attached screenshots show what I am seeing.


As you have already discovered, that won’t work because the Webpage Card’s url option expects a string value representing the URL.

input_text.mealie_url is not a URL. It’s the entity_id of an Input Text whose state value contains your URL. The Webpage Card doesn’t support getting the state value of an Input Text (or any other helper).

If the url option supported a template, then we would have a way of getting an Input Text’s state value. However, it doesn’t so you can’t use a Webpage Card the way you intended.

You can investigate the use of Custom Card -Templater. Someone else had a need for making the Webpage Card’s url option support templates (so it can dynamically compute the URL) and they used Card-Templater to do it. No guarantees it’ll meet all your requirements but it’s worth trying.

After you install Card-Templater, try something like this:

type: custom:card-templater
card:
  type: iframe
  url_template: "{{ states('input_text.mealie_url') }}"
  aspect_ratio: 50%
entities:
  - entity: input_text.mealie_url

Thank you!

This does work, however it is constantly reloading the page. Which makes it impossible to scroll on the webpage. So it is closer but a little glitchy.

I’ll play with it a little more and see if I can figure out why it’s constantly reloading.

Hi, have you ever found solution? I was to open webpage (change url) when new email arrives…

Yes I got it to work using the custom card mentioned above. Here is my yaml

type: custom:card-templater
card:
  type: iframe
  url_template: '{{ states(''input_text.mealie_url'') }}'
  aspect_ratio: 50%
entities:
  - entity: input_text.mealie_url