DNS Filter Card
AdGuard Home, Pi-hole or Technitium DNS at a glance: queries, blocked, protection and pause.
Built on the AdGuard Home and Pi-hole integrations included in Home Assistant and the Technitium DNS integration of the Marketplace, with every instance discovered automatically: four statistics tiles with their last 24 hours, detail counters, protection status, AdGuard setting switches and Pi-hole pause durations.
Highlights
- AdGuard Home, Pi-hole and Technitium DNS supported, several instances, all can be mixed
- DNS queries, blocked queries, blocked ratio and processing time or block lists, with their last 24 hours behind them
- Detail counters per integration (parental control, safe browsing, clients, cached and forwarded queries…)
- Status pill turning the AdGuard protection on or off, or pausing Pi-hole blocking
- AdGuard Home: the six setting switches as chips, and a filter lists refresh button
- Pi-hole and Technitium DNS: pause popup with durations, resume button while paused
- Sensors of your choice for a tile, a counter or the blocking switch
- Versions in the footer with an update chip for each pending update
- Mini card with a detail button switching to the full card
Cards
type: custom:dns-filter-cardInstall
- 1Open the repository in the Marketplace with the Add to Marketplace button above, or add
github.com/juju35/ha-dns-filter-cardas a custom repository (category Dashboard). - 2Download it from the Marketplace.
- 3Reload the browser and add the card from the dashboard editor.
Gallery 8
Documentation
From the README Features
Features
- Two cards: a full DNS Filter Card and a compact DNS Filter Mini Card, of type
custom:dns-filter-cardandcustom:dns-filter-mini-card - Three integrations: AdGuard Home, Pi-hole and Technitium DNS — automatic discovery, several instances supported, all can be mixed
- Sensors of your choice for any tile or counter (
entities), for another DNS filter or a sensor of your own - Four statistics tiles, one tint each: DNS queries, blocked queries, blocked ratio, and the average processing time (AdGuard Home) or the domains on the block lists (Pi-hole); each tile draws its last 24 hours behind it (recorder statistics, where the sensor keeps them)
- Detail counters: parental control, safe browsing and safe search blocks and the rules count (AdGuard Home); clients, unique domains, cached and forwarded queries, seen clients (Pi-hole)
- Status pill: protection on, protection off (AdGuard Home) or paused (Pi-hole), grey when unavailable; a click turns the AdGuard Home protection on or off, or pauses / resumes Pi-hole blocking
- AdGuard Home: the six setting switches as glass chips (protection, filtering, parental control, safe browsing, safe search, query log), a click toggles them; a refresh button updates the filter lists
- Pi-hole: a pause button opens a durations popup at the top of the card (5 min, 15 min, 30 min, 1 h, 2 h, or until resumed), a resume button while blocking is paused
- Versions in the footer (Core, FTL and web interface for Pi-hole) and an « Update available » chip for each pending update (click for its more-info dialog, where it can be installed)
- Detail button on the mini card (top right): it switches the mini card to the full card's content and back; a click anywhere outside the card brings the compact view back
- Click any value to open its Home Assistant history (more-info dialog)
- Round shield icon next to the name, in the status color, with the AdGuard or Pi-hole mark as a badge: a click opens the web interface of the instance (or the project's website when Home Assistant knows no address)
- Visual editor in the dashboard UI for both cards (no YAML needed)
- Light and dark mode, English, French, German, Spanish, Serbian (Cyrillic and Latin), Italian, Dutch, European Portuguese, Polish, Romanian, Danish, Swedish, Bulgarian, Russian, Ukrainian, Hungarian, Slovak, Czech, Slovenian, Latvian and Greek
- Single file, no external dependency
Supported integrations
Supported integrations
| Integration | What the cards show |
|---|---|
| AdGuard Home (built in) | DNS queries, blocked, blocked ratio, average processing time, parental control / safe browsing / safe search counters, rules count (sensor disabled by default), protection status, the six setting switches, filter lists refresh, AdGuard Home version and update |
| Pi-hole (built in, v5 and v6) | DNS queries, blocked, blocked ratio, domains on lists, clients, unique domains, cached and forwarded queries, seen clients, blocking status, pause / resume, Core / FTL / Web versions and updates |
Technitium DNS (Marketplace, technitiumdns) |
Total and blocked queries, blocked ratio (worked out from both), blocked zones, clients, cached and recursive queries, ad blocking switch, pause with its "Disable Ad Blocking for …" buttons (5 min to 1 day) / resume |
Several instances are supported, and the integrations can be mixed: pick the instance in the visual editor.
Prerequisites
Prerequisites
Home Assistant 2024.8 or later, and at least one of:
- the AdGuard Home integration (included in Home Assistant)
- the Pi-hole integration (included in Home Assistant)
- the Technitium DNS integration (Marketplace)
Configuration
Configuration
Visual editor#
Edit a dashboard, click Add card and search for DNS Filter Card or DNS Filter Mini Card. The first instance found is preselected; pick another one in the list if you have several (AdGuard Home and Pi-hole instances are listed together), set an optional title, the web interface address, the sections to display and the language. The preview updates live, and options left at their default are kept out of the generated YAML.
Minimal#
type: custom:dns-filter-card
type: custom:dns-filter-mini-card
Full options#
type: custom:dns-filter-card
device: 3f2a9c1e7b6d4a8f9e0c1b2a3d4e5f67
title: AdGuard Home
url: http://192.168.1.2:3000
show_stats: true
show_details: true
show_switches: true
show_history: true
show_versions: true
language: fr
type: custom:dns-filter-mini-card
device: 3f2a9c1e7b6d4a8f9e0c1b2a3d4e5f67
title: Pi-hole
show_history: true
zoom: true
language: fr
Options reference#
| Option | Card | Default | Description |
|---|---|---|---|
device |
both | First instance found | Instance to display (only needed with several): the id of its device in Home Assistant — pick it in the visual editor |
title |
both | Instance name | Card title |
show_title |
both | true |
Show the title in the header (e.g. false under a section heading of your own) |
show_subtitle |
both | true |
Show the subtitle under the title |
url |
both | Device configuration URL | Web interface, opened by a click on the header icon. By default the configuration URL of the device in Home Assistant (the « Visit » link of the device page), set by both integrations; without one, the project's website |
show_stats |
full | true |
The four statistics tiles |
show_details |
full | true |
The detail counters under the tiles |
show_switches |
full | true |
AdGuard Home setting switches, Pi-hole pause / resume button |
show_history |
both | true |
24 h curves behind the tiles, from the recorder's 5-minute statistics, fetched in one query (needs sensors with a state_class: AdGuard Home's counters have one, Pi-hole's don't, so Pi-hole tiles get no curve). Points sit at their time over the last 24 hours, and the curve breaks where data is missing |
show_versions |
full | true |
Versions in the footer (Pi-hole: Core, FTL, Web; the single AdGuard Home version sits in the subtitle) |
zoom |
mini | true |
Detail button at the top right: switches to the full card and back (false removes it) |
entities |
both | — | Sensors (and the blocking switch) of your choice, replacing the ones found: queries, blocked, ratio, speed, domains, clients, unique_domains, cached, forwarded, protection, status. For example entities: { ratio: sensor.my_blocked_ratio } |
language |
both | Auto | Force language: en, fr, de, es, sr, sr-Latn, it, nl, pt, pl, ro, da, sv, bg, ru, uk, hu, sk, cs, sl, lv or el (auto-detects from HA settings) |
How it works
How it works
The cards read the Home Assistant entity and device registries instead of entity ids: every entity of the adguard and pi_hole integrations is matched by its translation_key (dns_queries, dns_queries_blocked_ratio, average_processing_speed, ads_blocked, domains_being_blocked, core_update_available…) and grouped by the device it belongs to. Entity ids can therefore be in any language or renamed without breaking the cards.
- AdGuard Home: the status pill follows the Protection switch. The six switches of the integration become chips: a click calls
switch.toggle. The refresh button at the bottom right calls theadguard.refreshaction (filter lists, withoutforce). The Rules count sensor is disabled by default by the integration: enable it in Settings → Devices & services → Entities to see it among the detail counters. The update entity of the integration shows an « Update available » chip while it is on. - Technitium DNS: the integration gives no
translation_key; its entities have fixed English names, hence entity ids ending the same whatever the language (_total_queries,_blocked_queries,_blocked_zones…). Only the server (device model "DNS Server") is an instance, not its DHCP clients. The ad blocking switch is the one switch of the server; the pause durations are its "Disable Ad Blocking for …" buttons, and « until resumed » turns the switch off. The blocked ratio is worked out from the blocked and total queries. - Pi-hole: the status pill follows the Status binary sensor (on = blocking). The blocking switch carries no
translation_key: it is the one switch of the device. The pause button calls thepi_hole.disableaction with the chosen duration (00:30:00…), or turns the switch off for « until resumed »; the resume button turns it on again. Pi-hole v6 renamed its counters (dns_queries,ads_blocked,percent_ads_blocked): the former v5 keys (dns_queries_today,ads_blocked_today,ads_percentage_today) are read too. The three update entities carry the installed versions of Core, FTL and the web interface, shown in the footer.
Narrow cards#
The full card fits down to 9 columns of a sections view (about 234 px on a phone), the mini card down to 6 columns (about 156 px on a phone). Below about 240 px the statistics tiles stack in one column. Below about 200 px, the status pill shrinks to its colored dot (its text stays in its tooltip). In a container sized by its content (a grid auto column, an inline-block wrapper), the cards take a width of 400 px instead of collapsing.
Changelog
All 8 versions 1.3.0Nov 12, 2026Latest
Features
show_titleandshow_subtitleoptions (also in the visual editor) hide the header's title and its subtitle, separately, for a card placed under a section heading of its own (asked in juju35/ha-vehicle-card#72).
1.2.0Nov 11, 2026
Features
- Technitium DNS (#11): the technitiumdns integration of the Marketplace is found like AdGuard Home and Pi-hole: total and blocked queries, the blocked ratio worked out from both, blocked zones, clients, cached and recursive queries, the ad blocking switch, and the pause through its "Disable Ad Blocking for …" buttons (the durations it offers, or until resumed).
- Sensors of your choice:
entitiesreplaces the sensors found for a tile or a counter (queries,blocked,ratio,domains,clients…) and the blocking switch (protection).
1.1.1Nov 9, 2026
Fixes
- Translations: the cards are defined once the page's language file has arrived (at most 1.5 s; Home Assistant builds a card when its element gets defined), so the first render is already translated instead of English then redrawn; until a language file is in, a missing text reads the English one wherever the card has no fallback of its own.
1.1.0Nov 9, 2026
Performance
- Translations load on demand: the bundle keeps English only (114 KB → 70 KB) and each other language is its own
dns-filter-card.i18n.<lang>.jsfile next to it, fetched the first time a card needs it. Home Assistant loads every dashboard resource on every dashboard, so each page used to download and parse all 22 languages to use one. Until a language file has arrived (a few milliseconds), texts fall back to English, and the cards redraw once it is there.
Maintenance
- Build:
scripts/i18n-split.mjssplits the built bundle and rebuilds every table from the split files to check them (the build fails on any difference);src/keeps every language as before. - Release: every file of
dist/is attached. Manual installation copies the translation files too.
1.0.3Nov 8, 2026
Changes
- The status pill no longer opens a more-info dialog: a click turns the AdGuard Home protection on or off, or pauses / resumes Pi-hole blocking (the tooltip says what the click does).
1.0.2Nov 8, 2026
Fixes
- No focus ring left around the status pill or a tile after a mouse click opened its more-info dialog (keyboard use keeps it).