The Pi-hole integration allows you to retrieve statistics and interact with a Pi-hole system.
Adding Pi-hole to your Home Assistant instance can be done via the user interface, by using this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
Browse to your Home Assistant instance.
In the sidebar, select Settings.
From the configuration menu, select Devices & Services.
In the bottom right, select the Add Integration button.
From the list, search and select Pi-hole.
Follow the instructions on screen to complete the setup.
During the setup, it will ask for the following:
||The IP or domain name to Pi-Hole||192.168.1.1|
||Port used to get to the admin page||80|
||Name to for this Pi-Hole.||Pi-Hole|
||the path to the admin page.||/admin|
The combined host, port and location should take you to the login page of Pi-Hole. Using the example above, it would be
If your Pi-hole web interface is password protected, an API key will be requested by Home Assistant after submitting the initial details above. You can get the API key by logging into your Pi-Hole and going to from Settings > API and then the Show API token button.
The platform provides the following services to interact with your Pi-hole. Use switch entities when calling the services.
Disables configured Pi-hole(s) for the specified amount of time.
|Service data attribute||Required||Type||Description|
||string||Target switch entity. Use
||timedelta||Time for which Pi-hole should be disabled|
Example service call:
# Example service call to disable Pi-Hole for 30 minutes service: pi_hole.disable data: duration: '00:30' target: entity_id: all