Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions source/_integrations/pi_hole.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ During the setup, it will ask for the following:

| Item | Description | Example |
| ---- | ----------- | ------- |
| `Host` | The IP or domain name to Pi-Hole | 192.168.1.1 |
| `Port` | Port used to get to the admin page | 80 |
| `Host` | The IP or domain name to Pi-Hole. | 192.168.1.1 |
| `Port` | Port used to get to the admin page, typically `80` for `http` connections and `443` for `https` connections. | 80 |
| `Name` | Name to for this Pi-Hole. | Pi-Hole |
| `Location` | the path to the admin page. | /admin |
| `Location` | the path to the admin page. In the version 6 API this will be ignored. | /admin |
| `API Key or App Password` | This can be found in your Pi-hole's **Settings** > **API (expert mode)**. | `585a2fe...` |
| `Uses an SSL certificate` | Whether your Pi-hole has an Certificate, typically true for `https` connections and false for `http`. | {% icon "openmoji:check-mark" %} |
| `Verify SSL certificate` | Whether to use verify your Pi-hole's certificate, ignored in Pi-hole API version 5. | {% icon "openmoji:check-mark" %} |

The combined host, port and location should take you to the login page of Pi-Hole. Using the example above, it would be `http://192.168.1.1:80/admin`.

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.
To find your App Password, log into your Pi-Hole and go to **Settings** > **Web Interface/API**. Switch from **Basic** to **Expert** mode, then select **Configure app password**.

Versions of Pi-hole before version 6 (released in Feb 2025) use an API Key if the Pi-hole was password protected, this can be found in _Settings > API Tab_ and clicking **Show API token**

## Actions

Expand All @@ -49,8 +54,8 @@ Disables configured Pi-hole(s) for the specified amount of time.

| Data attribute | Required | Type | Description |
| ---------------------- | -------- | -------- | ----------- |
| `entity_id` | `False` | string | Target switch entity. Use `all` to target all Pi-hole services |
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled |
| `entity_id` | `False` | string | Target switch entity. Use `all` to target all Pi-hole services. |
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled. `'0'` will enable blocking indefinitely. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Logical error: ‘enable’ vs ‘disable’

A duration of '0' keeps the Pi-hole disabled indefinitely, it does not “enable blocking”.

-| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled. `'0'` will enable blocking indefinitely. |
+| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled. `'0'` disables blocking indefinitely. |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled. `'0'` will enable blocking indefinitely. |
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled. `'0'` disables blocking indefinitely. |
🤖 Prompt for AI Agents
In source/_integrations/pi_hole.markdown at line 58, the description for the
`duration` parameter incorrectly states that a value of '0' will enable blocking
indefinitely, but it actually keeps Pi-hole disabled indefinitely. Update the
text to correctly reflect that '0' means Pi-hole remains disabled indefinitely.


Example action:

Expand Down