mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update docs for configuration multiple Pi-holes (#10758)
* Update docs for configuration multiple Pi-holes * Code review
This commit is contained in:
parent
d6aed6e1a0
commit
bb35f515fd
@ -8,7 +8,7 @@ logo: pi_hole.png
|
|||||||
ha_release: 0.28
|
ha_release: 0.28
|
||||||
---
|
---
|
||||||
|
|
||||||
The `pi_hole` integration allows you to retrieve statistics and interact with a single [Pi-hole](https://pi-hole.net/) system.
|
The `pi_hole` integration allows you to retrieve statistics and interact with a [Pi-hole](https://pi-hole.net/) system.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@ -17,16 +17,23 @@ To enable this integration with the default configuration, add the following lin
|
|||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
pi_hole:
|
pi_hole:
|
||||||
|
- host: IP_ADDRESS
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
host:
|
host:
|
||||||
description: >
|
description: >
|
||||||
The hostname (and port), e.g., '192.168.0.3:4865' of the host where Pi-hole is running. If your Pi-Hole instance is the Hass.io add-on, you *must* specify port `4865`.
|
The hostname (and port), e.g. '192.168.0.3:4865' of the host where Pi-hole is running. Hass.io add-on users should be sure to specify port `4865`.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: >
|
||||||
|
The name for this Pi-hole. This name will be a part of the sensors created, e.g. `name: My Awesome Pi-hole` would result in sensor names beginning with `sensor.my_awesome_pi_hole_`.
|
||||||
|
|
||||||
|
**Note:** If you configure multiple Pi-Holes, each one *must* have a unique name.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: pi.hole
|
default: Pi-hole
|
||||||
|
|
||||||
location:
|
location:
|
||||||
description: The installation location of the Pi-hole API.
|
description: The installation location of the Pi-hole API.
|
||||||
required: false
|
required: false
|
||||||
@ -50,33 +57,63 @@ api_key:
|
|||||||
default: None
|
default: None
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Full example
|
### Full examples
|
||||||
|
|
||||||
|
Single Pi-hole running via Hass.io add-on:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
|
||||||
pi_hole:
|
pi_hole:
|
||||||
host: 'localhost:4865'
|
- host: 'localhost:4865'
|
||||||
ssl: false
|
```
|
||||||
|
|
||||||
|
Multiple Pi-holes:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
pi_hole:
|
||||||
|
- host: '192.168.0.2'
|
||||||
|
- host: '192.168.0.3'
|
||||||
|
name: 'Secondary Pi-Hole'
|
||||||
|
```
|
||||||
|
|
||||||
|
Pi-hole with a self-signed certificate:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
pi_hole:
|
||||||
|
- host: 'pi.hole'
|
||||||
|
ssl: true
|
||||||
verify_ssl: false
|
verify_ssl: false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Pi-hole with an `api_key` that allows it to be enabled or disabled:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
pi_hole:
|
||||||
|
- host: 'pi.hole'
|
||||||
|
api_key: !secret pi_hole_api_key
|
||||||
|
```
|
||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
The platform provides the following services to interact with your Pi-hole.
|
The platform provides the following services to interact with your Pi-hole.
|
||||||
|
|
||||||
### Service `pi_hole.disable`
|
### Service `pi_hole.disable`
|
||||||
|
|
||||||
Disable your Pi-hole for the specified amount of time.
|
Disables configured Pi-hole(s) for the specified amount of time.
|
||||||
|
|
||||||
| Service data attribute | Required | Type | Description |
|
| Service data attribute | Required | Type | Description |
|
||||||
| ---------------------- | -------- | -------- | ----------- |
|
| ---------------------- | -------- | -------- | ----------- |
|
||||||
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled |
|
| `duration` | `True` | timedelta | Time for which Pi-hole should be disabled |
|
||||||
|
| `name` | `False` | string | If preset, disables the named Pi-hole, otherwise, disables all configured Pi-holes |
|
||||||
|
|
||||||
_Note: This service requires `api_key` to be specified in the configuration._
|
_Note: This service requires `api_key` to be specified in the configuration._
|
||||||
|
|
||||||
### Service `pi_hole.enable`
|
### Service `pi_hole.enable`
|
||||||
|
|
||||||
Enable your Pi-hole.
|
Enables configured Pi-holes(s).
|
||||||
|
|
||||||
|
| Service data attribute | Required | Type | Description |
|
||||||
|
| ---------------------- | -------- | -------- | ----------- |
|
||||||
|
| `name` | `False` | string | If preset, enables the named Pi-hole, otherwise, enables all configured Pi-holes |
|
||||||
|
|
||||||
_Note: This service requires `api_key` to be specified in the configuration._
|
_Note: This service requires `api_key` to be specified in the configuration._
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user