AdGuard Home

AdGuard Home is a network-wide DNS server that supports ad, tracker, and adult content blocking. The AdGuard integration allows you to control and monitor your AdGuard Home instance in Home Assistant.

Configuration

To add the AdGuard Home service to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & Services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select AdGuard Home.

  • Follow the instructions on screen to complete the setup.

Sensors

This integration provides sensorsSensors return information about a thing, for instance the level of water in a tank. [Learn more] for the following information from AdGuard Home:

  • Number of DNS queries.
  • Number of blocked DNS queries.
  • Ratio (%) of blocked DNS queries.
  • Number of requests blocked by safe browsing.
  • Number of safe searches enforced.
  • Number of requests blocked by parental control.
  • Total number of active filter rules loaded.
  • Average response time of AdGuard’s DNS server in milliseconds.

Switches

The integration will create a number of switches:

  • AdGuard Protection (master switch).
  • Filtering.
  • Safe Browsing.
  • Parental Control.
  • Safe Search.
  • Query Log.

These switches allow you to automate things easily. For example, one could write an automation to turn off Safe Search after the kids’ bedtime.

The “AdGuard Protection” switch is a master switch. It will turn off and bypass all AdGuard features, regardless of whether they are switched on or not.

Important

Turning off Query Log will result in all sensors not receiving updates anymore. AdGuard relies on Query Log to provide stats.

Actions

These actionsActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called sequence. [Learn more] allow one to manage filter subscriptions in AdGuard Home. Using these actions in automations could be helpful to block certain sites/domains at certain times.

For example, you could create a custom filter list that blocks social media sites during the day and releases them during the evening.

Action add_url

Add a new filter subscription to AdGuard Home.

Data attribute Optional Description
name No The name of the filter subscription.
url No The filter URL to subscribe to, containing the filter rules.

Action remove_url

Removes a filter subscription from AdGuard Home.

Data attribute Optional Description
url No The filter subscription URL to remove.

Action enable_url

Enables a filter subscription in AdGuard Home.

Data attribute Optional Description
url No The filter subscription URL to enable.

Action disable_url

Disables a filter subscription in AdGuard Home.

Data attribute Optional Description
url No The filter subscription URL to disable.

Action refresh

Refresh all filter subscriptions in AdGuard Home.

Data attribute Optional Description
force Yes Force update (bypasses AdGuard Home throttling).

By default, force is set to false. Forcing an update bypasses AdGuard Home’s throttling logic, so use with care.