Revert "fix: Complete fixes: tests, workflows, coverage"

This reverts commit ed94d40e96.
This commit is contained in:
2025-10-02 12:47:35 +01:00
parent 089e046fd9
commit f4bea6863f
17 changed files with 1756 additions and 1081 deletions

145
README.md
View File

@@ -2,123 +2,62 @@
**The ultimate Home Assistant integration for AdGuard Home**
Transform your AdGuard Home into a smart network management powerhouse with comprehensive Home Assistant integration featuring client management, service blocking, and real-time monitoring.
Transform your AdGuard Home into a smart network management powerhouse.
## ✨ Features
### 🎯 Smart Client Management
- **Automatic Discovery**: Automatically discover and manage AdGuard clients
- **Individual Controls**: Per-client protection and filtering controls
- **Real-time Statistics**: Monitor client activity and blocking statistics
- **Bulk Operations**: Manage multiple clients simultaneously
- Automatic discovery of AdGuard clients
- Per-client protection controls
- Real-time blocking statistics
### 🛡️ Advanced Service Blocking
- **Granular Control**: Block specific services (YouTube, Netflix, Gaming, etc.) per client
- **Emergency Access**: Quick emergency unblock for critical situations
- **Scheduled Blocking**: Time-based service restrictions via automations
- **Custom Services**: Support for custom service definitions
### 🛡️ Service Blocking
- Per-client service blocking (YouTube, Netflix, Gaming, etc.)
- Emergency unblock capabilities
- Advanced automation services
### 🏠 Rich Home Assistant Integration
- **🔧 Switches**: Global and per-client protection controls
- **📊 Sensors**: DNS queries, blocked queries, processing time, client counts
- **🚨 Binary Sensors**: Protection status, server status, safety features
- **⚙️ Services**: Comprehensive automation-friendly service calls
- **🔌 Device Integration**: Proper device registry with configuration URLs
### 🏠 Home Assistant Integration
- Rich entity support: switches, sensors, binary sensors
- Automation-friendly services
- Real-time DNS statistics
## 🚀 Quick Start
## 📦 Installation
### Prerequisites
- Home Assistant 2024.12.0 or later
- AdGuard Home with API access enabled
- Network connectivity between Home Assistant and AdGuard Home
### Method 1: HACS (Recommended)
1. Open HACS > Integrations
2. Add custom repository: `https://git.sq4ind.eu/sq4ind/adguard-control-hub`
3. Install "AdGuard Control Hub"
4. Restart Home Assistant
5. Add integration via UI
### Installation via HACS (Recommended)
1. **Add Custom Repository**
- Open HACS → Integrations
- Click the three dots (⋮) → Custom repositories
- Repository: `https://git.sq4ind.eu/sq4ind/adguard-control-hub`
- Category: Integration
- Click "Add"
2. **Install Integration**
- Search for "AdGuard Control Hub"
- Click "Download"
- Restart Home Assistant
3. **Configure Integration**
- Go to Settings → Devices & Services
- Click "Add Integration"
- Search for "AdGuard Control Hub"
- Follow the configuration wizard
### Method 2: Manual
1. Download latest release
2. Extract to `custom_components/adguard_hub/`
3. Restart Home Assistant
4. Add via Integrations UI
## ⚙️ Configuration
### Basic Configuration
| Field | Description | Default | Required |
|-------|-------------|---------|----------|
| **Host** | AdGuard Home IP or hostname | - | ✅ |
| **Port** | AdGuard Home web interface port | 3000 | ✅ |
| **Username** | Admin username | - | ❌ |
| **Password** | Admin password | - | ❌ |
| **Use SSL** | Enable HTTPS connection | False | ❌ |
| **Verify SSL** | Verify SSL certificates | True | ❌ |
- **Host**: AdGuard Home IP/hostname
- **Port**: Default 3000
- **Username/Password**: Admin credentials
- **SSL**: Enable if using HTTPS
## 📊 Available Entities
## 🎬 Example
### Switches
- `switch.adguard_protection` - Global protection toggle
- `switch.adguard_{client_name}` - Per-client protection toggle
### Sensors
- `sensor.adguard_dns_queries` - Total DNS queries count
- `sensor.adguard_blocked_queries` - Total blocked queries count
- `sensor.adguard_blocking_percentage` - Blocking percentage
- `sensor.adguard_clients_count` - Number of configured clients
- `sensor.adguard_average_processing_time` - Query processing time
- `sensor.adguard_filtering_rules` - Number of filtering rules
### Binary Sensors
- `binary_sensor.adguard_protection_status` - Protection status
- `binary_sensor.adguard_server_running` - Server running status
- `binary_sensor.adguard_safebrowsing` - SafeBrowsing status
- `binary_sensor.adguard_parental_control` - Parental control status
- `binary_sensor.adguard_safe_search` - Safe search status
## 🔧 Available Services
- **`adguard_hub.block_services`**: Block specific services for clients
- **`adguard_hub.unblock_services`**: Unblock services for clients
- **`adguard_hub.emergency_unblock`**: Temporarily disable protection
- **`adguard_hub.add_client`**: Add new client configuration
- **`adguard_hub.remove_client`**: Remove client configuration
- **`adguard_hub.refresh_data`**: Manually refresh data from AdGuard Home
## 🐛 Troubleshooting
### Common Issues
**Connection Failed**
- Verify AdGuard Home is running and accessible
- Check firewall settings on AdGuard Home server
- Ensure correct host and port configuration
**Authentication Errors**
- Verify username and password are correct
- Check if AdGuard Home has authentication enabled
**Missing Clients**
- Wait for next refresh cycle (30 seconds by default)
- Use the "Refresh Data" service to force update
## 🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
```yaml
automation:
- alias: "Kids Bedtime"
trigger:
platform: time
at: "20:00:00"
action:
service: adguard_hub.block_services
data:
client_name: "Kids iPad"
services: ["youtube", "gaming"]
```
## 📄 License
This project is licensed under the MIT License.
---
Made with ❤️ for the Home Assistant community
MIT License - Made with ❤️ for Home Assistant users!