Change pi_hole services (#13495)

This commit is contained in:
Xiaonan Shen 2020-07-20 22:28:34 +08:00 committed by GitHub
parent 0f0b00e9af
commit da89f9c9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,8 @@ title: Pi-hole
description: Instructions on how to integrate Pi-hole with Home Assistant. description: Instructions on how to integrate Pi-hole with Home Assistant.
ha_category: ha_category:
- System Monitor - System Monitor
- Sensor
- Switch
ha_iot_class: Local Polling ha_iot_class: Local Polling
ha_config_flow: true ha_config_flow: true
ha_release: 0.28 ha_release: 0.28
@ -34,8 +36,6 @@ host:
name: name:
description: > 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_`. 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
@ -99,7 +99,9 @@ pi_hole:
## 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. Use switch entities when calling the services.
_Note: Switch entity requires `api_key` to be configured._
### Service `pi_hole.disable` ### Service `pi_hole.disable`
@ -107,19 +109,5 @@ Disables configured Pi-hole(s) for the specified amount of time.
| Service data attribute | Required | Type | Description | | Service 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 | | `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._
### Service `pi_hole.enable`
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._
This integration was not made by Pi-hole LLC or the Pi-hole community. They did not provide support, feedback, testing, or any other help during its creation. This is a third party platform which may break if Pi-hole changes their API in a later release. It is not official, not developed, not supported, and not endorsed Pi-hole LLC or the Pi-hole community. The trademark `Pi-hole` and the logo is used here to describe the platform. `Pi-hole` is a registered trademark of Pi-hole LLC.