I’m trying to use the DNS IP Integration but can’t set it up as whatever I get the error below. I have seen posts on the forum which confirm other people have this issue but I have also seen a recent post where someone says they configured this integration so I am just wondering how to use it. Basically I want a sensor which shows my external IP address, I use DynDNS with DuckDNS already but want to trigger a notification when it IP address change.
I don’t use that integration, but I’m pretty sure you have to replace myip
with your actual IP.
Thanks @ShadowFist but which IP do you mean? I can’t be the external one as that’s what I’m trying to figure out?
Having the same problem here - no matter what you fill into the form, you get the same error, and it resets back to the default data.
gives the same invalid hostname error when you hit submit (can’t show it, new user, only one image allowed

It seems like it won’t accept any hostname to lookup.
Ignore what I said earlier. The default hostname which pops up when attempting to configure the integration is correct - you do not need to enter your IP address.
Out of curiosity, I just set up the integration and it worked for me out of the box with the default values:
Maybe the issue is caused by your current DNS settings? I configured both HA and my router to use cloudflare’s (1.1.1.1) DNS, with google DNS (8.8.8.8) as a fallback secondary. If you’re still using your router’s default DNS, that might be pointing to your ISP, who might not be allowing traffic to opendns.
That’s really weird. My DNS servers are both google (8888 and 8844) so that shouldn’t be the problem. I can ping OpenDNS from my HA terminal window so it can get there.
So the dns servers I use (8888 and 8844) don’t recognise that domain. The only DNS server I can find which does is the OpenDNS one (208.67.222.222) but adding that as the resolver doesn’t work either
Looks like it’s already logged with the maintainer - DNS IP integration URL is out of date 2025 · Issue #144706 · home-assistant/core · GitHub
@ShadowFist what version of HA are you running, as this seems to be a very recent regression, like possibly only since 2025.5.1
I’ve got the terminal addon running, and I’ve confirmed that name resolution is working fine from within the homeassistant container (under HAOS), but nothing I do will make the DNS IP integration succeed in looking anything up.
Still haven’t upgraded to 2025.5, so it might as well be related to the latest version.
Then again, both that github issue as well as other closed issues mention that this error occurred before May, so I doubt it’s related.
Doesn’t work for me but found a workaround by creating this command_line sensor:
command_line:
- sensor:
name: "Public IP Address"
command: "dig @208.67.222.222 +short myip.opendns.com | head -n 1"
scan_interval: 300
Great. Thanks. Works like a charm
Liked the command line option, but did not work on my system. Using the opendns advice to use “https://myipv4.p1.opendns.com/get_my_ip” and curl works.
command_line:
- sensor:
unique_id: public_ip_address
name: "Public IP Address"
command: "curl -s https://myipv4.p1.opendns.com/get_my_ip | jq -r '.ip'"
scan_interval: 300