Pi-hole
The Pi-hole integration allows you to retrieve statistics and interact with a Pi-hole system.
此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。
During the setup, it will ask for the following:
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.
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. Your admin login password may be used instead but this is not recommended.
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
The platform provides the following actions to interact with your Pi-hole. Use switch entities when calling the actions.
Action: Disable
The pi_hole.disable action disables configured Pi-hole(s) for the specified amount of time.
Example action:
Switches
The integration creates a switch for the Pi-hole allowing you to toggle ad-blocking on and off.
Sensors
The integration creates a number of sensors which report various ad-blocking metrics as well as diagnostic information about the pi-hole itself.

