Complete AdGuard monitoring and control for Home Assistant
Built with the tools and technologies:
A comprehensive dashboard card for managing and monitoring your AdGuard DNS ad blocker directly from Home Assistant. The card provides real-time statistics in an intuitive, dashboard-style interface that matches the AdGuard visual identity.
- Main Statistics Dashboard - Four color-coded tiles showing your most important AdGuard metrics:
- Total DNS Queries
- Queries Blocked
- Block Percentage
- Domains on Blocklists
- Client Statistics - See active clients, unique domains, unique clients, etc.
- Performance Data - View cached queries and forwarded DNS requests
- Interactive Elements - Configurable tap, hold, and double-tap actions for all metrics
- CPU and Memory Usage Graph - Visualize your AdGuard's system resource usage over the last 24 hours:
- Real-time CPU usage tracking
- Memory consumption monitoring
- Historical data visualization
- Customizable line styles (normal, gradient, no fill)
- Automatic Data Fetching - Chart automatically loads statistics data from Home Assistant's recorder
- Responsive Design - Chart adapts to card width and displays smoothly on all devices
- Enable/Disable Controls - Toggle AdGuard filtering with a single click as well as Group Default
- Component Versions - Display installed versions for all AdGuard components:
- Core
- Docker
- FTL
- Web Interface
- Home Assistant Integration
- Last Refresh Time
- Real-time Status - Visual indication of AdGuard's current state
- Error Detection - Automatic highlighting when issues are detected
- Update Indicators - Clear notification when updates are available
- FTL Diagnostic Message Count - Shows diagnostic message count when more than 0
- Interactive Diagnostic Management - Smart icon behavior based on diagnostic message count:
- When diagnostic messages exist: Tap to purge diagnostic messages, hold/double-tap for more info
- When no diagnostic messages: All interactions show more info about the diagnostic entity
- Custom Actions: Override default behavior with custom tap, hold, and double-tap actions
- Clickable Elements - All sections can be configured with custom actions
- Visual Indicators - Color-coded statistics to understand status at a glance
- Customizable Card - Set custom title and icon to match your dashboard style
- Entity Filtering - Ability to exclude specific entities or entire sections
- Collapsible Sections - Ability to collapse/expand sections to save space:
- Switches section (on/off toggles)
- Centralized Control - Manage multiple AdGuard instances from a single card
- Aggregated Status - See at a glance how many of your AdGuard instances are active
- Unified Control - Centralized access to all switches from your AdGuard instances
- Intelligent Status Indicators - Status automatically adjusts based on collective state:
- Shows "Running" when all instances are active
- Shows "Partial" when some instances are active and some are inactive
- Shows count of active instances (e.g., "2/3")
Note
The multi-AdGuard feature currently has some limitations:
- Statistics shown are from the first AdGuard instance in the list only
- All switches from all AdGuard instances are displayed in a single list
- Only header status reflects the multi-AdGuard state
- Mobile-friendly - Optimized layout for both desktop and mobile viewing
- Fluid Layout - Responsive design adapts to available space
Warning
Before using this card, please ensure you have the AdGuard integration installed in your Home Assistant instance.
- Open HACS in your Home Assistant instance
- Click the menu icon in the top right and select "Custom repositories"
- Add this repository URL and select "Dashboard" as the category
https://github.com/homeassistant-extras/adguard-card
- Click "Install"
- Download the
adguard-card.jsfile from the latest release in the Releases tab. - Copy it to your
www/community/adguard-card/folder - Add the following to your
configuration.yaml(or add as a resource in dashboards menu)
lovelace:
resources:
- url: /local/community/adguard-card/adguard-card.js
type: moduleAdd the card to your dashboard using the UI editor or YAML:
The card is fully configurable through the card editor, allowing you to customize:
- AdGuard device selection (single or multiple)
- Card title and icon
- Custom actions for statistics and info panels
This is the most minimal configuration needed to get started:
type: custom:adguard
device_id: your_adguard_device_idFor multiple AdGuard instances:
type: custom:adguard
device_id:
- your_first_adguard_device_id
- your_second_adguard_device_id
- etc..The card will automatically:
- Detect all AdGuard entities associated with the device(s)
- Organize statistics in the dashboard layout
- Show version information for all components
- For multiple AdGuard instances: combine switches and show aggregated status
If you're unsure what your AdGuard device ID is, here are several ways to find it:
- Add the card through the visual editor
- Select your AdGuard device from the dropdown
- Click "Show Code Editor" or "View YAML" to see the generated configuration
- Copy the
device_idvalue for use in manual YAML configuration
- Go to Settings → Devices & Services → Devices
- Search for "AdGuard" or browse to find your AdGuard device
- Click on the device and look at the URL - the device ID will be in the URL path
| Name | Type | Default | Description |
|---|---|---|---|
| device_id | string or array | Required | The ID(s) of your AdGuard device(s) in Home Assistant |
| title | string | AdGuard | Custom title for the card header |
| icon | string | mdi:shield-check | Custom icon for the card header |
| badge | object | none | Configure actions for the card icon/badge |
| stats | object | none | Configure actions for statistics tiles |
| info | object | none | Configure actions for additional info items |
| exclude_sections | list | none | Sections of entities to exclude. See below. |
| exclude_entities | list | none | Entities to remove from the card. |
| entity_order | list | none | Custom order for switch, button, sensor entities or dividers. |
| collapsed_sections | list | none | Sections to be initially collapsed. See below. |
| switch_spacing | string | flex | Layout style for switches: flex, space-around, space-between |
| styles | object | none | Custom CSS styles for card and sections. See below. |
| chart | object | none | Chart configuration options. See below. |
| features | list | See below | Optional flags to toggle different features |
Each section (stats, info) supports the following action types:
| Name | Type | Default | Description |
|---|---|---|---|
| tap_action | object | optional | Action to perform when tapped |
| hold_action | object | optional | Action to perform when held |
| double_tap_action | object | optional | Action to perform when double-tapped |
Actions can be configured to perform various operations such as:
- Toggle entities
- Show more info
- Call services
- Navigate to different views
- And more!
The following section names can be used with exclude_sections:
- chart
- footer
- header
- statistics
- sensors
- switches
The following section names can be used with collapsed_sections:
- switches
The switch_spacing option controls how switches are arranged in the switches section:
- flex (default): Switches flow naturally with standard flexbox behavior
- space-around: Equal space around each switch
- space-between: Maximum space between switches, no space at edges
The card supports custom CSS styles for different areas, allowing you to completely customize the appearance:
type: custom:adguard
device_id: adguard_device_1
styles:
card:
border-radius: 20px
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
section:
background-color: rgba(0, 0, 0, 0.1)
border-radius: 8pxThe following CSS variables can be used within the styles configuration for advanced customization:
| Variable | Area | Description | Default |
|---|---|---|---|
--user--section--caret--display |
section | Control visibility of section caret icons | block |
Example:
styles:
section:
--user--section--caret--display: none # Hide the collapse/expand arrows
background-color: rgba(0, 0, 0, 0.1)
padding: 10pxThe chart option allows you to customize the appearance of the system metrics chart:
| Name | Type | Default | Description |
|---|---|---|---|
| line_type | string | normal | Chart line style. Options: normal, gradient, gradient_no_fill, no_fill |
Chart Line Types:
normal(default): Standard solid lines with filled areasgradient: Gradient-colored lines with gradient-filled areasgradient_no_fill: Gradient-colored lines without fillno_fill: Solid lines without fill areas
The card automatically discovers and identifies all AdGuard entities based on:
- Entity naming patterns
- Translation keys
- Entity relationships to the device
This includes sensors, buttons, switches, binary sensors, and update entities.
type: custom:adguard
device_id: adguard_device_1type: custom:adguard
device_id:
- adguard_device_1
- adguard_device_2
title: 'My AdGuard Network'type: custom:adguard
device_id: adguard_device_1
title: 'My AdGuard Server'
icon: 'mdi:shield-check'type: custom:adguard
device_id: adguard_device_1
exclude_sections:
- sensors
- switches
exclude_entities:
- sensor.adguard_latest_data_refreshtype: custom:adguard
device_id: adguard_device_1
title: 'Network Protection'
stats:
tap_action:
action: more-info
hold_action:
action: navigate
navigation_path: /lovelace/networkThe card icon/badge supports custom actions that can override the default diagnostic message behavior:
type: custom:adguard
device_id: adguard_device_1
badge:
tap_action:
action: navigate
navigation_path: /lovelace/adguard-dashboard
hold_action:
action: call-service
perform_action: browser_mod.popup
data:
title: AdGuard Status
content: 'Quick overview of AdGuard status'
double_tap_action:
action: more-info
entity_id: sensor.adguard_statusNote
Default Badge Behavior: If no custom badge actions are configured, the card will automatically show more info when tapping, holding, or double-tapping the badge icon.
Warning
Multi-AdGuard Action Behavior: When using multiple AdGuard instances, actions are executed for each configured AdGuard instance. This can lead to unexpected behavior:
- More-info actions: Only one dialog can be open at a time, so you may only see info for the first or last AdGuard instance
- Navigation actions: Multiple navigation attempts may conflict with each other
- Service calls: Will be executed for all AdGuard instances, which may or may not be desired
Consider using single-entity actions or service calls with specific targeting when configuring multi-AdGuard setups.
type: custom:adguard
device_id: adguard_device_1
# Configure stat box actions
stats:
tap_action:
action: call-service
perform_action: browser_mod.popup
data:
title: AdGuard Statistics
content: 'Detailed view of AdGuard stats'
hold_action:
action: navigate
navigation_path: /lovelace/network-monitoring
# Configure additional info actions
info:
tap_action:
action: more-info
double_tap_action:
action: toggletype: custom:adguard
device_id: adguard_device_1
switch_spacing: 'space-around'
entity_order:
- button.adguard_action_refresh_data
- sensor.adguard_dns_queries
- sensor.adguard_dns_queries_blocked
- switch.adguardtype: custom:adguard
device_id: adguard_device_1
entity_order:
- divider
- sensor.adguard_dns_queries
- sensor.adguard_dns_queries_blocked
- divider
- switch.adguardtype: custom:adguard
device_id: adguard_device_1
collapsed_sections:
- switchestype: custom:adguard
device_id: adguard_device_1
chart:
line_type: gradient # Options: normal, gradient, gradient_no_fill, no_filltype: custom:adguard
device_id: adguard_device_1
exclude_sections:
- chart # Hide the system metrics chart-
Initial redesign: create initial card design -
Auto-discovery: automatic detection of AdGuard entities -
Dashboard statistics: visual representation of key metrics -
Version info: display component versions -
Custom actions: tap/hold/double-tap actions for all elements - thanks @dunxd -
Card customization: custom title and icon options -
Performance optimizations: improved code structure and efficiency -
Enhanced entity mapping: ⭐ First contributor ⭐ better entity identification with translation keys - thanks @bastgau -
Translations: ability to add translations - thanks @ajavibp -
Multi-AdGuard support: manage and monitor multiple AdGuard instances - thanks @Drudoo -
Collapsible sections: collapse/expand card sections to save space - thanks @Teleportist -
Additional visualization options: using HA native more-info, etc. - thanks @dunxd -
Entity ordering: customize the order of displayed entities - thanks @Teleportist -
Section hiding: ability to disable sections or entities - thanks @pcnate, @bastgau, @Anto79-ops -
Visual separators: add dividers for switches - thanks @Teleportist -
Diagnostics info indicator: show diagnostic messages count - thanks @WalterPepeka -
Greek translation: ⭐ Second contributor ⭐ added Greek language support - thanks @ChriZathens -
Customizable badge actions: configurable tap/hold/double-tap actions for card badge - thanks @moshoari -
Backwards compatibility: maintained Home Assistant integration backwards compatibility - thanks @ccheath -
System metrics chart: visualize CPU and memory usage over time with customizable line styles - thanks me! -
Adguard conversion: helping make the card work w/ AG - thanks @pqpxo -
Custom Styles: apply custom CSS styles - thanks @pqpxo
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
adguardproject. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
- 📣 Check out discord: Need further help, have ideas, want to chat?
- 🃏 Check out my other cards! Maybe you have an integration that I made cards for.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/homeassistant-extras/adguard-card
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.' - Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
The AdGuard card supports multiple languages to provide a better experience for users worldwide.
- English
- Spanish
- Greek
- Italian
Want to contribute a translation? See our translation guide for instructions.
This project is protected under the MIT License. For more details, refer to the LICENSE file.
- Built using LitElement
- Inspired by AdGuard's own dashboard design
- Thanks to all contributors!
Forgive me and my badges..
Stats
Ratings
















