home-assistant-intents 2025.10.1__py3-none-any.whl → 2025.11.7__py3-none-any.whl
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.
- home_assistant_intents/__init__.py +17 -5
- home_assistant_intents/data/ca.json +54 -0
- home_assistant_intents/data/da.json +18 -0
- home_assistant_intents/data/de-CH.json +49 -2
- home_assistant_intents/data/de.json +302 -111
- home_assistant_intents/data/el.json +237 -2
- home_assistant_intents/data/en.json +112 -6
- home_assistant_intents/data/fr.json +15 -15
- home_assistant_intents/data/it.json +17 -0
- home_assistant_intents/data/ne.json +19 -0
- home_assistant_intents/data/nl.json +121 -0
- home_assistant_intents/data/pl.json +36 -0
- home_assistant_intents/data/pt-BR.json +53 -0
- home_assistant_intents/data/ro.json +50 -0
- home_assistant_intents/data/ru.json +2 -1
- home_assistant_intents/data/sk.json +17 -0
- home_assistant_intents/data/sr.json +45 -28
- home_assistant_intents/data/sv.json +16 -9
- home_assistant_intents/fuzzy/config.json +425 -179
- home_assistant_intents/fuzzy/en/ngram/homeassistant_HassTimerStatus.db +0 -0
- home_assistant_intents/fuzzy/en/ngram/homeassistant_HassTimerStatus.json +33 -27
- {home_assistant_intents-2025.10.1.dist-info → home_assistant_intents-2025.11.7.dist-info}/METADATA +1 -1
- {home_assistant_intents-2025.10.1.dist-info → home_assistant_intents-2025.11.7.dist-info}/RECORD +26 -26
- {home_assistant_intents-2025.10.1.dist-info → home_assistant_intents-2025.11.7.dist-info}/WHEEL +0 -0
- {home_assistant_intents-2025.10.1.dist-info → home_assistant_intents-2025.11.7.dist-info}/licenses/LICENSE.md +0 -0
- {home_assistant_intents-2025.10.1.dist-info → home_assistant_intents-2025.11.7.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ from enum import Enum
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import IO, Any, Callable, Collection, Dict, List, Optional, Set, Tuple
|
|
11
11
|
|
|
12
|
+
|
|
12
13
|
from .languages import LANGUAGES
|
|
13
14
|
|
|
14
15
|
_PACKAGE = "home_assistant_intents"
|
|
@@ -161,13 +162,21 @@ def get_language_scores(
|
|
|
161
162
|
# -----------------------------------------------------------------------------
|
|
162
163
|
|
|
163
164
|
|
|
165
|
+
@dataclass
|
|
166
|
+
class FuzzySlotCombinationInfo:
|
|
167
|
+
"""Information about a fuzzy slot combination."""
|
|
168
|
+
|
|
169
|
+
context_area: bool
|
|
170
|
+
name_domains: Set[str]
|
|
171
|
+
|
|
172
|
+
|
|
164
173
|
@dataclass
|
|
165
174
|
class FuzzyConfig:
|
|
166
175
|
"""Shared configuration for fuzzy matching."""
|
|
167
176
|
|
|
168
|
-
# intent -> (slot, slot) ->
|
|
169
|
-
slot_combinations: Dict[str, Dict[Tuple[str, ...],
|
|
170
|
-
"""
|
|
177
|
+
# intent -> (slot, slot) -> slot combo info
|
|
178
|
+
slot_combinations: Dict[str, Dict[Tuple[str, ...], FuzzySlotCombinationInfo]]
|
|
179
|
+
"""info for all intent slot combinations."""
|
|
171
180
|
|
|
172
181
|
# list name -> [slot names]
|
|
173
182
|
slot_list_names: Dict[str, List[str]]
|
|
@@ -223,8 +232,11 @@ def get_fuzzy_config(
|
|
|
223
232
|
return FuzzyConfig(
|
|
224
233
|
slot_combinations={
|
|
225
234
|
intent_name: {
|
|
226
|
-
tuple(sorted(combo_key_str.split())):
|
|
227
|
-
|
|
235
|
+
tuple(sorted(combo_key_str.split())): FuzzySlotCombinationInfo(
|
|
236
|
+
context_area=combo_info.get("context_area", False),
|
|
237
|
+
name_domains=set(combo_info.get("name_domains", [])),
|
|
238
|
+
)
|
|
239
|
+
for combo_key_str, combo_info in intent_combos.items()
|
|
228
240
|
}
|
|
229
241
|
for intent_name, intent_combos in config_dict["slot_combinations"].items()
|
|
230
242
|
},
|
|
@@ -199,6 +199,23 @@
|
|
|
199
199
|
}
|
|
200
200
|
]
|
|
201
201
|
},
|
|
202
|
+
"HassShoppingListCompleteItem": {
|
|
203
|
+
"data": [
|
|
204
|
+
{
|
|
205
|
+
"sentences": [
|
|
206
|
+
"<completa> <item> de <my_list>",
|
|
207
|
+
"<completa> de <my_list_req> <item>"
|
|
208
|
+
],
|
|
209
|
+
"response": "item_completed",
|
|
210
|
+
"expansion_rules": {
|
|
211
|
+
"my_list": "[la] [meva] llista [de (la compra|compres|comprar)]",
|
|
212
|
+
"my_list_req": "[la] [meva] llista de (la compra|compres|comprar)",
|
|
213
|
+
"item": "{shopping_list_item:item}",
|
|
214
|
+
"completa": "(completa|desmarca|elimina|treu|borra|cancel[·l]a)[r|re]"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
202
219
|
"HassGetState": {
|
|
203
220
|
"data": [
|
|
204
221
|
{
|
|
@@ -1154,6 +1171,37 @@
|
|
|
1154
1171
|
}
|
|
1155
1172
|
]
|
|
1156
1173
|
},
|
|
1174
|
+
"HassFanSetSpeed": {
|
|
1175
|
+
"data": [
|
|
1176
|
+
{
|
|
1177
|
+
"sentences": [
|
|
1178
|
+
"<configura> la velocitat del[s] ventilador[s] [d'aqu(i|í)] (a|al) <fan_speed>"
|
|
1179
|
+
],
|
|
1180
|
+
"requires_context": {
|
|
1181
|
+
"area": {
|
|
1182
|
+
"slot": true
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"sentences": [
|
|
1188
|
+
"<configura> la velocitat [de|del] [ventilador] <name> (a|al) <fan_speed>",
|
|
1189
|
+
"velocitat [de|del] <name> (a|al) <fan_speed>",
|
|
1190
|
+
"<name> (a|al) <fan_speed>"
|
|
1191
|
+
],
|
|
1192
|
+
"requires_context": {
|
|
1193
|
+
"domain": "fan"
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"sentences": [
|
|
1198
|
+
"<configura> els ventiladors [de|del|al] <area_floor> (a|al) <fan_speed>",
|
|
1199
|
+
"<configura> la velocitat dels ventiladors [de|del|al] <area_floor> (a|al) <fan_speed>",
|
|
1200
|
+
"ventilador[s] [de|del] <area_floor> (a|al) <fan_speed>"
|
|
1201
|
+
]
|
|
1202
|
+
}
|
|
1203
|
+
]
|
|
1204
|
+
},
|
|
1157
1205
|
"HassVacuumStart": {
|
|
1158
1206
|
"data": [
|
|
1159
1207
|
{
|
|
@@ -1591,6 +1639,9 @@
|
|
|
1591
1639
|
"HassMediaUnpause": {
|
|
1592
1640
|
"default": "Continuant amb la reproducció"
|
|
1593
1641
|
},
|
|
1642
|
+
"HassShoppingListCompleteItem": {
|
|
1643
|
+
"item_completed": "Completat {{ slots.item }}"
|
|
1644
|
+
},
|
|
1594
1645
|
"HassSetPosition": {
|
|
1595
1646
|
"default": "Posició establerta"
|
|
1596
1647
|
},
|
|
@@ -1612,6 +1663,9 @@
|
|
|
1612
1663
|
"HassSetVolume": {
|
|
1613
1664
|
"default": "Volum establert"
|
|
1614
1665
|
},
|
|
1666
|
+
"HassFanSetSpeed": {
|
|
1667
|
+
"default": "Canvio la velocitat"
|
|
1668
|
+
},
|
|
1615
1669
|
"HassListCompleteItem": {
|
|
1616
1670
|
"item_completed": "Completat {{ slots.item }}"
|
|
1617
1671
|
},
|
|
@@ -166,6 +166,21 @@
|
|
|
166
166
|
}
|
|
167
167
|
]
|
|
168
168
|
},
|
|
169
|
+
"HassShoppingListCompleteItem": {
|
|
170
|
+
"data": [
|
|
171
|
+
{
|
|
172
|
+
"sentences": [
|
|
173
|
+
"<fuldfør> <punkt> (på|fra|af) <indkøbsliste>",
|
|
174
|
+
"kryds <punkt> af på <indkøbsliste>",
|
|
175
|
+
"marker <punkt> (som købt;på <indkøbsliste>)"
|
|
176
|
+
],
|
|
177
|
+
"response": "item_completed",
|
|
178
|
+
"expansion_rules": {
|
|
179
|
+
"punkt": "{shopping_list_item:item}"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
169
184
|
"HassGetState": {
|
|
170
185
|
"data": [
|
|
171
186
|
{
|
|
@@ -3440,6 +3455,9 @@
|
|
|
3440
3455
|
"HassMediaUnpause": {
|
|
3441
3456
|
"default": "Startet igen"
|
|
3442
3457
|
},
|
|
3458
|
+
"HassShoppingListCompleteItem": {
|
|
3459
|
+
"item_completed": "Afkrydsede {{ slots.item }}"
|
|
3460
|
+
},
|
|
3443
3461
|
"HassSetPosition": {
|
|
3444
3462
|
"default": "Position indstillet"
|
|
3445
3463
|
},
|
|
@@ -82,6 +82,22 @@
|
|
|
82
82
|
}
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
|
+
"HassShoppingListCompleteItem": {
|
|
86
|
+
"data": [
|
|
87
|
+
{
|
|
88
|
+
"sentences": [
|
|
89
|
+
"(lösch|str(i|y)ch) <item> (vo[r]|uf|us) <my_list>",
|
|
90
|
+
"(schliess|hak) <item> (vo[r]|uf|us) <my_list> ab",
|
|
91
|
+
"<item> (vo[r]|uf|us) <my_list> (lösche|str(i|y)che|abhääggle)"
|
|
92
|
+
],
|
|
93
|
+
"response": "item_completed",
|
|
94
|
+
"expansion_rules": {
|
|
95
|
+
"my_list": "[mire |üsere |dr ][(I|Ii|Y|Yy)choufs](Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te)",
|
|
96
|
+
"item": "{shopping_list_item:item}"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
85
101
|
"HassGetState": {
|
|
86
102
|
"data": [
|
|
87
103
|
{
|
|
@@ -539,7 +555,7 @@
|
|
|
539
555
|
"response": "item_added",
|
|
540
556
|
"expansion_rules": {
|
|
541
557
|
"my_list": "[mini |d |d' |d'][(I|Ii|Y|Yy)choufs](Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te)",
|
|
542
|
-
"item": "{
|
|
558
|
+
"item": "{shopping_list_item:item}"
|
|
543
559
|
}
|
|
544
560
|
}
|
|
545
561
|
]
|
|
@@ -902,7 +918,7 @@
|
|
|
902
918
|
},
|
|
903
919
|
"expansion_rules": {
|
|
904
920
|
"my_list": "[mini |d |d' |d']({name}[(-| )](Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te)|[(Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te) ]{name})",
|
|
905
|
-
"item": "{
|
|
921
|
+
"item": "{todo_list_item:item}"
|
|
906
922
|
}
|
|
907
923
|
}
|
|
908
924
|
]
|
|
@@ -919,6 +935,25 @@
|
|
|
919
935
|
}
|
|
920
936
|
]
|
|
921
937
|
},
|
|
938
|
+
"HassListCompleteItem": {
|
|
939
|
+
"data": [
|
|
940
|
+
{
|
|
941
|
+
"sentences": [
|
|
942
|
+
"(lösch|str(i|y)ch) <item> (vo[r]|uf|us) <my_list>",
|
|
943
|
+
"(schliess|hak) <item> (vo[r]|uf|us) <my_list> ab",
|
|
944
|
+
"<item> (vo[r]|uf|us) <my_list> (lösche|str(i|y)che|abhääggle)"
|
|
945
|
+
],
|
|
946
|
+
"response": "item_completed",
|
|
947
|
+
"requires_context": {
|
|
948
|
+
"domain": "todo"
|
|
949
|
+
},
|
|
950
|
+
"expansion_rules": {
|
|
951
|
+
"my_list": "[mire |üsere |dr ]({name}[(-| )](Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te)|[(Lys[ch]te|lys[ch]te|Lis[ch]te|Liis[ch]te) ]{name})",
|
|
952
|
+
"item": "{todo_list_item:item}"
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
922
957
|
"HassClimateSetTemperature": {
|
|
923
958
|
"data": [
|
|
924
959
|
{
|
|
@@ -1045,6 +1080,9 @@
|
|
|
1045
1080
|
"HassMediaUnpause": {
|
|
1046
1081
|
"default": "{{slots.name | capitalize }} schpiut wyter"
|
|
1047
1082
|
},
|
|
1083
|
+
"HassShoppingListCompleteItem": {
|
|
1084
|
+
"item_completed": "{{ slots.item }} abghäägglet"
|
|
1085
|
+
},
|
|
1048
1086
|
"HassSetPosition": {
|
|
1049
1087
|
"default": "Ha d Position gsetzt"
|
|
1050
1088
|
},
|
|
@@ -1061,6 +1099,9 @@
|
|
|
1061
1099
|
"HassSetVolume": {
|
|
1062
1100
|
"default": "Ha d Lutschterchi yygschteut"
|
|
1063
1101
|
},
|
|
1102
|
+
"HassListCompleteItem": {
|
|
1103
|
+
"item_completed": "{{ slots.item }} abghäägglet"
|
|
1104
|
+
},
|
|
1064
1105
|
"HassDecreaseTimer": {
|
|
1065
1106
|
"default": "Timer aapasst"
|
|
1066
1107
|
},
|
|
@@ -1246,9 +1287,15 @@
|
|
|
1246
1287
|
}
|
|
1247
1288
|
]
|
|
1248
1289
|
},
|
|
1290
|
+
"shopping_list_item": {
|
|
1291
|
+
"wildcard": true
|
|
1292
|
+
},
|
|
1249
1293
|
"list_item": {
|
|
1250
1294
|
"wildcard": true
|
|
1251
1295
|
},
|
|
1296
|
+
"todo_list_item": {
|
|
1297
|
+
"wildcard": true
|
|
1298
|
+
},
|
|
1252
1299
|
"zone": {
|
|
1253
1300
|
"wildcard": true
|
|
1254
1301
|
},
|