Metadata-Version: 2.4
Name: ha-voice-label-sync
Version: 0.3.1
Summary: Generate voice assistant configuration from Home Assistant labels.
Author: Philippe Le Bonhomme
License-Expression: MIT
Project-URL: Homepage, https://github.com/flimo44/ha-voice-label-sync
Project-URL: Documentation, https://github.com/flimo44/ha-voice-label-sync#readme
Project-URL: Issues, https://github.com/flimo44/ha-voice-label-sync/issues
Project-URL: Source, https://github.com/flimo44/ha-voice-label-sync
Keywords: home-assistant,google-assistant,voice-assistant,automation,yaml
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Home Automation
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<img width="1024" height="559" alt="image" src="https://github.com/user-attachments/assets/6918c5ae-b95b-4d81-9108-7b2cd8acd0fd" />

> [!IMPORTANT]
> **HA Voice Label Sync is not a voice assistant integration.**
>
> HVLS extends existing Home Assistant voice assistant integrations by automatically generating their entity exposure configuration from Home Assistant labels.
>
> It does **not** configure Google Assistant, Alexa, or any other voice assistant for you.
>
> Before using HVLS, make sure the corresponding Home Assistant integration is already configured and working.

# HA Voice Label Sync
[![Python checks](https://github.com/flimo44/ha-voice-label-sync/actions/workflows/python-check.yml/badge.svg?branch=main)](https://github.com/flimo44/ha-voice-label-sync/actions/workflows/python-check.yml)

> **Manage once in Home Assistant. Sync everywhere.**

Automatically generate voice assistant configurations from **Home Assistant labels**.

HVLS turns Home Assistant labels into the single source of truth for exposing entities to your voice assistants. Preview the generated configuration, verify it, then generate it safely.

---
Native Home Assistant integration

✓ CLI

✓ Google Assistant backend


✨ Features

✔ Automatic backups
✔ HACS support (coming soon)

> 🚧 Actively developed — feedback and contributions are welcome.
>
> Feedback and ideas are welcome.
## ✨ Why HA Voice Label Sync?

Managing large `entity_config` files manually quickly becomes tedious and error-prone.

HA Voice Label Sync lets you manage everything directly from Home Assistant:

- 🏷️ Choose which entities to expose using labels
- 👀 Preview the generated configuration before writing anything
- 💾 Create automatic backups
- 🏠 Integrate natively with Home Assistant
- ⚡ Generate configuration in seconds
- 🔌 Designed to support multiple voice assistants

---

## 📸 Screenshots

> *(Screenshots will be updated with the latest UI.)*

### Home Assistant Configuration
![Configuration](assets/screenshots/image2.png)
### Preview Panel
![Preview panel](assets/screenshots/image.png)
<img width="380" height="367" alt="image" src="https://github.com/user-attachments/assets/fe6f447c-d318-45b3-ba2c-3767eb046063" />

### Generated YAML
![Generated YAML](assets/screenshots/image3.png)
### Google Home synchronization



## 🚀 Typical workflow

---
                  🏷 Label
                        ↓
                  👀 Preview
                        ↓
                  ✅ Review
                        ↓
                  ⚡ Generate
                        ↓
                  🔄 Restart HA
                        ↓
                  🎤 Sync Voice Assistant


---

# Features

## 🏠 Home Assistant Integration

- Native Config Flow
- Options Flow
- Preview Panel
- Generate action
- Preview action
- Automatic backups
- Secure WebSocket API
- English & French translations

---

## 🐍 Python Engine

- Reusable Python package
- Standalone CLI
- Atomic file generation
- Dry-run support
- Automatic backup retention
- Backend-independent architecture

---

## 🎤 Supported Voice Assistants

| Backend | Status |
|----------|--------|
| Google Assistant | ✅ Supported |
| Amazon Alexa | 🚧 Planned |
| Apple HomeKit | 📋 Planned |

---

# Architecture

```text
                Home Assistant
                       │
                       ▼
                    Labels
                       │
                       ▼
             HA Voice Label Sync
                       │
         ┌─────────────┴─────────────┐
         │                           │
         ▼                           ▼
 Google Assistant           Future Backends
                               • Alexa
                               • HomeKit
```
```text
                Home Assistant
                      │
                      ▼
         Official Google Assistant integration
                      │
                      ▼
        entity_config (generated by HVLS)
                      ▲
                      │
         Home Assistant Labels (managed by you)
```
        
---

## Installation

### Home Assistant (HACS)

> **Official HACS listing:** Pending review.

Until the integration is available in the official HACS repository, install it as a custom repository:

1. Open **HACS**
2. Open the menu **⋮ → Custom repositories**
3. Add:

   ```text
   https://github.com/flimo44/ha-voice-label-sync
   ```

4. Select the category **Integration**
5. Search for **HA Voice Label Sync**
6. Install it
7. Restart Home Assistant

---

## Home Assistant configuration

HVLS generates the entity exposure configuration in a separate YAML file.

Add the following entry to your `configuration.yaml`:

```yaml
google_assistant:
  entity_config: !include google_assistant_entities.yaml
```
Home Assistant configuration

```yaml
google_assistant:
  project_id: YOUR_PROJECT_ID
  service_account: !include google_key.json
  report_state: true
  expose_by_default: false
  entity_config: !include google_assistant_entities.yaml
```

By default, HVLS generates:

```text
/config/google_assistant_entities.yaml
```

After generating or updating the file, restart Home Assistant so the new Google Assistant configuration is loaded.

---

## Home Assistant (Manual)

Documentation coming soon.

---

## Python package

```bash
pip install ha-voice-label-sync
```

---

# Quick Start

1. Create a label in Home Assistant.
2. Assign this label to the entities you want to expose.
3. Configure the integration.
4. Click **Preview**.
5. Review the generated configuration.
6. Click **Generate**.
7. Restart Home Assistant.
8. Synchronize your voice assistant.

---

# CLI

HVLS also provides a standalone CLI for advanced users and automation.

```bash
hvls --help
```

---

# Documentation

Additional documentation will be available in the `docs/` directory.

---

# Roadmap

See **[ROADMAP.md](ROADMAP.md)**.

---

# Contributing

Contributions are welcome!

Bug reports, feature requests and pull requests help improve the project.

If you have ideas, don't hesitate to open an issue or start a discussion.

---

# License

MIT
