ha-voice-label-sync 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 flimo44
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,254 @@
1
+ Metadata-Version: 2.4
2
+ Name: ha-voice-label-sync
3
+ Version: 0.2.0
4
+ Summary: Generate voice assistant configuration from Home Assistant labels.
5
+ Author: Philippe Le Bonhomme
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/flimo44/ha-voice-label-sync
8
+ Project-URL: Documentation, https://github.com/flimo44/ha-voice-label-sync#readme
9
+ Project-URL: Issues, https://github.com/flimo44/ha-voice-label-sync/issues
10
+ Project-URL: Source, https://github.com/flimo44/ha-voice-label-sync
11
+ Keywords: home-assistant,google-assistant,voice-assistant,automation,yaml
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Home Automation
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ <img width="1024" height="559" alt="image" src="https://github.com/user-attachments/assets/6918c5ae-b95b-4d81-9108-7b2cd8acd0fd" />
23
+
24
+ ### Automatically generate your voice assistant configuration from Home Assistant labels.
25
+
26
+ [![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)
27
+
28
+ ✨ Features
29
+
30
+ ✔ Generate Google Assistant YAML from labels
31
+ ✔ Home Assistant integration
32
+ ✔ CLI
33
+ ✔ Automatic backups
34
+ ✔ PyPI package
35
+ ✔ HACS support (coming soon)
36
+
37
+ > 🚧 Early development project
38
+ >
39
+ > Feedback and ideas are welcome.
40
+
41
+ ## Why?
42
+
43
+ Do you maintain dozens of Google Assistant entities manually?
44
+
45
+ Managing voice assistant configurations manually quickly becomes difficult.
46
+
47
+ HA Voice Label Sync automatically generates the required configuration from Home Assistant labels, making your labels the single source of truth.
48
+
49
+ With the current release you can:
50
+
51
+ Stop maintaining large YAML files manually.
52
+ Avoid duplicated configuration.
53
+ Keep Home Assistant as the only place where entities are managed.
54
+ Generate your configuration in seconds.
55
+
56
+ ## Current Status
57
+
58
+ ## Project status
59
+
60
+ HVLS is currently under active development.
61
+
62
+ Latest stable release: `v0.1.2`
63
+
64
+ Current development version: `0.2.0.dev0`
65
+
66
+ Current capabilities:
67
+
68
+ - Standalone CLI
69
+ - Reusable Python core
70
+ - Google Assistant YAML generation
71
+ - Dry-run support
72
+ - Safe atomic file writing
73
+ - Automatic backups and retention
74
+ - Initial Home Assistant integration skeleton
75
+
76
+ Not yet available:
77
+
78
+ - Full Home Assistant configuration UI
79
+ - Home Assistant actions and buttons
80
+ - Backup restoration from the UI
81
+ - HACS installation
82
+
83
+ HA Voice Label Sync has been designed to support multiple voice assistants.
84
+
85
+ - Currently supported :
86
+
87
+
88
+ ✅ Google Assistant
89
+
90
+ - Planned :
91
+
92
+ Amazon Alexa
93
+ Apple HomeKit
94
+
95
+ Instead of maintaining a long list of exposed entities manually, simply assign a label in Home Assistant, run the script, and let HA Voice Label Sync generate the configuration for you.
96
+
97
+
98
+ ## Features
99
+
100
+ - Select entities using a Home Assistant label
101
+ - Generate `entity_config` for Google Assistant
102
+ - Use Home Assistant friendly names
103
+ - Use Home Assistant areas as Google rooms
104
+ - Ignore disabled or hidden entities
105
+ - Dry-run mode before writing the file
106
+
107
+ ## How it works
108
+
109
+
110
+ ```
111
+ Home Assistant
112
+ │
113
+ ▼
114
+ Labels
115
+ │
116
+ ▼
117
+ Voice Assistant Sync
118
+ │
119
+ ┌──────┴───────┐
120
+ │ │
121
+ Google Assistant Amazon Alexa
122
+
123
+ ```
124
+
125
+ ## Generated entity_config
126
+
127
+ ```yaml
128
+ switch.prise_pompe:
129
+ expose: true
130
+ name: Pompe piscine
131
+ room: Piscine
132
+ ```
133
+
134
+
135
+ Home Assistant configuration
136
+
137
+ ```yaml
138
+ google_assistant:
139
+ project_id: YOUR_PROJECT_ID
140
+ service_account: !include google_key.json
141
+ report_state: true
142
+ expose_by_default: false
143
+ entity_config: !include google_assistant_entities.yaml
144
+ ```
145
+
146
+ ## Quick start
147
+
148
+ Installation
149
+
150
+ Option 1 – Download the script
151
+
152
+ Download the latest version of ga_label_sync.py from the repository.
153
+
154
+ Copy it to your Home Assistant scripts directory.
155
+
156
+ Typical locations are:
157
+
158
+ ```text
159
+ /config/scripts/
160
+
161
+ or
162
+
163
+ <home-assistant-config>/scripts/
164
+ ```
165
+
166
+ depending on your Home Assistant installation.
167
+
168
+ Option 2 – Clone the repository
169
+ ```bash
170
+ git clone https://github.com/flimo44/ha-voice-label-sync.git
171
+ ```
172
+ The script is located in:
173
+ ```text
174
+ scripts/ga_label_sync.py
175
+ ```
176
+
177
+ ```Tip
178
+
179
+ If you simply want to use the script, downloading scripts/ga_label_sync.py is enough.
180
+
181
+ Cloning the repository is recommended only if you plan to follow development or contribute to the project.
182
+ ```
183
+
184
+ Usage :
185
+
186
+ ### Step 1 — Add the label
187
+
188
+ <img width="455" height="375" alt="Capture d&#39;écran 2026-06-26 201643" src="https://github.com/user-attachments/assets/a262942a-5fb1-4a84-b88e-5db12eb67be8" />
189
+
190
+
191
+ ### Step 2 — Preview the generated configuration
192
+
193
+
194
+ <img width="555" height="172" alt="Capture d&#39;écran 2026-06-26 203136" src="https://github.com/user-attachments/assets/66ea6d63-983b-467b-9870-198d64b027bd" />
195
+
196
+ ```bash
197
+ python3 /config/scripts/ga_label_sync.py --label "google_assistant" --dry-run
198
+ ```
199
+
200
+ ```
201
+ # --- Couloir ---
202
+ lock.serrure_maison:
203
+ expose: true
204
+ name: Serrure porte entrée
205
+ room: Couloir
206
+
207
+ # --- Jardin ---
208
+ switch.portail:
209
+ expose: true
210
+ name: Portail
211
+ room: Jardin
212
+
213
+ # --- Piscine ---
214
+ input_select.piscine_mode_gestion:
215
+ expose: true
216
+ name: "Piscine - Mode Gestion"
217
+ room: Piscine
218
+
219
+ switch.piscine_chauffage:
220
+ expose: true
221
+ name: Pac Piscine
222
+ room: Piscine
223
+
224
+ switch.prise_pompe2:
225
+ expose: true
226
+ name: Pompe piscine
227
+ room: Piscine
228
+ ```
229
+
230
+
231
+ ### Step 3 — Generate the file
232
+ ```bash
233
+ python3 /config/scripts/ga_label_sync.py --label "google_assistant"
234
+ ```
235
+ <img width="454" height="446" alt="Capture d&#39;écran 2026-06-26 200340" src="https://github.com/user-attachments/assets/6f0938ae-13e9-4856-9b4f-7db5e8290171" />
236
+
237
+
238
+ ### Step 4 — Restart Home Assistant
239
+
240
+
241
+
242
+ ### Step 5 — Synchronize Google Home
243
+
244
+
245
+ Google Home before synchronization
246
+
247
+ <img width="1080" height="2400" alt="Screenshot_2026-06-26-19-44-33-60_2d2bd67b5e15ae98c151ac739cd6881e" src="https://github.com/user-attachments/assets/a03d1005-fde8-4186-b8ea-da2f426c5a84" />
248
+
249
+ Google Home after synchronization
250
+
251
+ <img width="1080" height="2400" alt="Screenshot_2026-06-26-19-45-48-86_2d2bd67b5e15ae98c151ac739cd6881e" src="https://github.com/user-attachments/assets/5b4d96cc-9da9-4419-9d1f-f5eac4fbec8c" />
252
+
253
+ License
254
+ MIT
@@ -0,0 +1,233 @@
1
+ <img width="1024" height="559" alt="image" src="https://github.com/user-attachments/assets/6918c5ae-b95b-4d81-9108-7b2cd8acd0fd" />
2
+
3
+ ### Automatically generate your voice assistant configuration from Home Assistant labels.
4
+
5
+ [![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)
6
+
7
+ ✨ Features
8
+
9
+ ✔ Generate Google Assistant YAML from labels
10
+ ✔ Home Assistant integration
11
+ ✔ CLI
12
+ ✔ Automatic backups
13
+ ✔ PyPI package
14
+ ✔ HACS support (coming soon)
15
+
16
+ > 🚧 Early development project
17
+ >
18
+ > Feedback and ideas are welcome.
19
+
20
+ ## Why?
21
+
22
+ Do you maintain dozens of Google Assistant entities manually?
23
+
24
+ Managing voice assistant configurations manually quickly becomes difficult.
25
+
26
+ HA Voice Label Sync automatically generates the required configuration from Home Assistant labels, making your labels the single source of truth.
27
+
28
+ With the current release you can:
29
+
30
+ Stop maintaining large YAML files manually.
31
+ Avoid duplicated configuration.
32
+ Keep Home Assistant as the only place where entities are managed.
33
+ Generate your configuration in seconds.
34
+
35
+ ## Current Status
36
+
37
+ ## Project status
38
+
39
+ HVLS is currently under active development.
40
+
41
+ Latest stable release: `v0.1.2`
42
+
43
+ Current development version: `0.2.0.dev0`
44
+
45
+ Current capabilities:
46
+
47
+ - Standalone CLI
48
+ - Reusable Python core
49
+ - Google Assistant YAML generation
50
+ - Dry-run support
51
+ - Safe atomic file writing
52
+ - Automatic backups and retention
53
+ - Initial Home Assistant integration skeleton
54
+
55
+ Not yet available:
56
+
57
+ - Full Home Assistant configuration UI
58
+ - Home Assistant actions and buttons
59
+ - Backup restoration from the UI
60
+ - HACS installation
61
+
62
+ HA Voice Label Sync has been designed to support multiple voice assistants.
63
+
64
+ - Currently supported :
65
+
66
+
67
+ ✅ Google Assistant
68
+
69
+ - Planned :
70
+
71
+ Amazon Alexa
72
+ Apple HomeKit
73
+
74
+ Instead of maintaining a long list of exposed entities manually, simply assign a label in Home Assistant, run the script, and let HA Voice Label Sync generate the configuration for you.
75
+
76
+
77
+ ## Features
78
+
79
+ - Select entities using a Home Assistant label
80
+ - Generate `entity_config` for Google Assistant
81
+ - Use Home Assistant friendly names
82
+ - Use Home Assistant areas as Google rooms
83
+ - Ignore disabled or hidden entities
84
+ - Dry-run mode before writing the file
85
+
86
+ ## How it works
87
+
88
+
89
+ ```
90
+ Home Assistant
91
+ │
92
+ ▼
93
+ Labels
94
+ │
95
+ ▼
96
+ Voice Assistant Sync
97
+ │
98
+ ┌──────┴───────┐
99
+ │ │
100
+ Google Assistant Amazon Alexa
101
+
102
+ ```
103
+
104
+ ## Generated entity_config
105
+
106
+ ```yaml
107
+ switch.prise_pompe:
108
+ expose: true
109
+ name: Pompe piscine
110
+ room: Piscine
111
+ ```
112
+
113
+
114
+ Home Assistant configuration
115
+
116
+ ```yaml
117
+ google_assistant:
118
+ project_id: YOUR_PROJECT_ID
119
+ service_account: !include google_key.json
120
+ report_state: true
121
+ expose_by_default: false
122
+ entity_config: !include google_assistant_entities.yaml
123
+ ```
124
+
125
+ ## Quick start
126
+
127
+ Installation
128
+
129
+ Option 1 – Download the script
130
+
131
+ Download the latest version of ga_label_sync.py from the repository.
132
+
133
+ Copy it to your Home Assistant scripts directory.
134
+
135
+ Typical locations are:
136
+
137
+ ```text
138
+ /config/scripts/
139
+
140
+ or
141
+
142
+ <home-assistant-config>/scripts/
143
+ ```
144
+
145
+ depending on your Home Assistant installation.
146
+
147
+ Option 2 – Clone the repository
148
+ ```bash
149
+ git clone https://github.com/flimo44/ha-voice-label-sync.git
150
+ ```
151
+ The script is located in:
152
+ ```text
153
+ scripts/ga_label_sync.py
154
+ ```
155
+
156
+ ```Tip
157
+
158
+ If you simply want to use the script, downloading scripts/ga_label_sync.py is enough.
159
+
160
+ Cloning the repository is recommended only if you plan to follow development or contribute to the project.
161
+ ```
162
+
163
+ Usage :
164
+
165
+ ### Step 1 — Add the label
166
+
167
+ <img width="455" height="375" alt="Capture d&#39;écran 2026-06-26 201643" src="https://github.com/user-attachments/assets/a262942a-5fb1-4a84-b88e-5db12eb67be8" />
168
+
169
+
170
+ ### Step 2 — Preview the generated configuration
171
+
172
+
173
+ <img width="555" height="172" alt="Capture d&#39;écran 2026-06-26 203136" src="https://github.com/user-attachments/assets/66ea6d63-983b-467b-9870-198d64b027bd" />
174
+
175
+ ```bash
176
+ python3 /config/scripts/ga_label_sync.py --label "google_assistant" --dry-run
177
+ ```
178
+
179
+ ```
180
+ # --- Couloir ---
181
+ lock.serrure_maison:
182
+ expose: true
183
+ name: Serrure porte entrée
184
+ room: Couloir
185
+
186
+ # --- Jardin ---
187
+ switch.portail:
188
+ expose: true
189
+ name: Portail
190
+ room: Jardin
191
+
192
+ # --- Piscine ---
193
+ input_select.piscine_mode_gestion:
194
+ expose: true
195
+ name: "Piscine - Mode Gestion"
196
+ room: Piscine
197
+
198
+ switch.piscine_chauffage:
199
+ expose: true
200
+ name: Pac Piscine
201
+ room: Piscine
202
+
203
+ switch.prise_pompe2:
204
+ expose: true
205
+ name: Pompe piscine
206
+ room: Piscine
207
+ ```
208
+
209
+
210
+ ### Step 3 — Generate the file
211
+ ```bash
212
+ python3 /config/scripts/ga_label_sync.py --label "google_assistant"
213
+ ```
214
+ <img width="454" height="446" alt="Capture d&#39;écran 2026-06-26 200340" src="https://github.com/user-attachments/assets/6f0938ae-13e9-4856-9b4f-7db5e8290171" />
215
+
216
+
217
+ ### Step 4 — Restart Home Assistant
218
+
219
+
220
+
221
+ ### Step 5 — Synchronize Google Home
222
+
223
+
224
+ Google Home before synchronization
225
+
226
+ <img width="1080" height="2400" alt="Screenshot_2026-06-26-19-44-33-60_2d2bd67b5e15ae98c151ac739cd6881e" src="https://github.com/user-attachments/assets/a03d1005-fde8-4186-b8ea-da2f426c5a84" />
227
+
228
+ Google Home after synchronization
229
+
230
+ <img width="1080" height="2400" alt="Screenshot_2026-06-26-19-45-48-86_2d2bd67b5e15ae98c151ac739cd6881e" src="https://github.com/user-attachments/assets/5b4d96cc-9da9-4419-9d1f-f5eac4fbec8c" />
231
+
232
+ License
233
+ MIT
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ha-voice-label-sync"
7
+ version = "0.2.0"
8
+ description = "Generate voice assistant configuration from Home Assistant labels."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "Philippe Le Bonhomme" }
15
+ ]
16
+ keywords = [
17
+ "home-assistant",
18
+ "google-assistant",
19
+ "voice-assistant",
20
+ "automation",
21
+ "yaml"
22
+ ]
23
+ classifiers = [
24
+ "Development Status :: 3 - Alpha",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: Home Automation"
29
+ ]
30
+ dependencies = []
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/flimo44/ha-voice-label-sync"
34
+ Documentation = "https://github.com/flimo44/ha-voice-label-sync#readme"
35
+ Issues = "https://github.com/flimo44/ha-voice-label-sync/issues"
36
+ Source = "https://github.com/flimo44/ha-voice-label-sync"
37
+
38
+ [project.scripts]
39
+ hvls = "hvls.cli:main"
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+
44
+ [tool.ruff]
45
+ target-version = "py311"
46
+ line-length = 88
47
+
48
+ [tool.ruff.lint]
49
+ select = ["E", "F", "I", "UP"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+