`'config' is undefined`

Hi everyone,

I’ve been using Home Assistant for a couple of years now, but I don’t visit the community very often. Usually I find solutions online with a bit of Googling — but not this time. Also, I’m not sure if I’m posting this in the right category, so feel free to let me know if it should be moved.

My issue:

When I enter {{ config.name }} in Developer Tools > Template, I get the error:
'config' is undefined.

The same thing happens with anything related to core.config, like latitude, longitude, external_url, etc.
My core.config looks fine, and I’m not seeing any errors in the logs on startup (a few warnings).
As a test, I disabled all non-standard integrations, but that didn’t make a difference either.

My setup:

  • Raspberry Pi 4 (4GB RAM, 512 GB SSD)
  • Installation method: Home Assistant OS
  • Core: 2025.6.3
  • Supervisor: 2025.06.2
  • Operating System: 15.2
  • Frontend: 20250531.4

Any ideas or tips would be much appreciated!

Thanks in advance,
Frank Decrock

That’s expected behaviour. Can you link to the documentation that says you can access the config via Jinja templates like you are trying to?

If some sort of AI robot has imagined it, then please remember the small print at the bottom:

I’ve been using HA for over five years and have never encountered it, although I have encountered many situations where people have mistakenly trusted AI guidance.

Hi Troon,

Thanks for your reply!
I’m trying to set up the Withings integration, but I’m getting an error when I try to authorize the app.

In the authorization URL, I see something like:
...https%3A%2F%2Fmy.home-assistant.io%2Fredirect...
So it’s using my.home-assistant.io instead of my own registered external URL, which is correctly set in core.config.

From what I’ve found via Google and ChatGPT, this might be because external_url isn’t actually set.
Somewhere I read that I could check this with {{ config.external_url }} in the template editor — but apparently that’s incorrect.

Does it show up correctly under System / Network in the UI?

Yes, that’s exactly where I filled it in.

Go to https://my.home-assistant.io/ in the browser and enter the actual location of your instance there. The URL as suggested by the integration documentation is what you need to enter in the setup, and it will redirect to the right place in your actual instance.

Thanks Edwin for your comment, but of course I entered my own URL when creating the Withings app.

Don’t use your own URL. My working setup for reference:

Entering your own URL when creating the Withings app is not what the docs ask for. It asks you to enter the https://my.home-assistant.io/redirect/oauth url. Then Withings redirects you there, and that will redirect to HA again. I followed it to the letter and it worked perfectly.

1 Like