DNS IP
The DNS IP integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] will expose an IP address, fetched via DNS resolution (every 2 minutes), as its value. It provides both IPv4 and IPv6 lookup as separate sensors depending on accessibility to resolvers.
- When you enable the integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] with the default value, it will query the OpenDNS nameservers with the hostname
myip.opendns.com, which will resolve to your external/public IP address. - If you specify a
hostname, a regular DNS lookup will be performed, providing you the IP the hostname resolves to. If your hostname resolves to multiple IP addresses, the lowest IP will be returned as the state. The first 10 IPs will be returned in ascending order in theip_addressesattribute.
Configuration
To add the DNS IP service to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select DNS IP.
-
Follow the instructions on screen to complete the setup.
Resolver and port may be adjusted after the integration has been setup by adjusting it’s options:
Options
To define options for DNS IP, follow these steps:
-
In Home Assistant, go to Settings > Devices & services.
-
If multiple instances of DNS IP are configured, choose the instance you want to configure.
-
On the card, select the cogwheel
. - If the card does not have a cogwheel, the integration does not support options for this service.

-
Edit the options, then select Submit to save the changes.
Data fetching and limitations
Resolving the IP address(es) happens every two minutes.
If resolving the IP address(es) is not possible due to connectivity issues or other errors, it retries 3 times before going unavailable.
Troubleshooting
This service is reliant on an internet connection and that the chosen resolver(s) are available.
- Turn on debug logging and check the logs.
- Manually test to resolve the hostname using any command line tools or websites available.
- Manually reload the integration.
Remove the integration
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three dots
menu. Then, select Delete.