mirror of
https://github.com/home-assistant/core.git
synced 2025-08-31 18:31:35 +02:00
Bump hassil to 3.1.0 (#150584)
This commit is contained in:
@@ -11,7 +11,7 @@ import time
|
|||||||
from typing import Any, Literal, final
|
from typing import Any, Literal, final
|
||||||
|
|
||||||
from hassil import Intents, recognize
|
from hassil import Intents, recognize
|
||||||
from hassil.expression import Expression, ListReference, Sequence
|
from hassil.expression import Expression, Group, ListReference
|
||||||
from hassil.intents import WildcardSlotList
|
from hassil.intents import WildcardSlotList
|
||||||
|
|
||||||
from homeassistant.components import conversation, media_source, stt, tts
|
from homeassistant.components import conversation, media_source, stt, tts
|
||||||
@@ -413,7 +413,7 @@ class AssistSatelliteEntity(entity.Entity):
|
|||||||
for intent in intents.intents.values():
|
for intent in intents.intents.values():
|
||||||
for intent_data in intent.data:
|
for intent_data in intent.data:
|
||||||
for sentence in intent_data.sentences:
|
for sentence in intent_data.sentences:
|
||||||
_collect_list_references(sentence, wildcard_names)
|
_collect_list_references(sentence.expression, wildcard_names)
|
||||||
|
|
||||||
for wildcard_name in wildcard_names:
|
for wildcard_name in wildcard_names:
|
||||||
intents.slot_lists[wildcard_name] = WildcardSlotList(wildcard_name)
|
intents.slot_lists[wildcard_name] = WildcardSlotList(wildcard_name)
|
||||||
@@ -727,9 +727,9 @@ class AssistSatelliteEntity(entity.Entity):
|
|||||||
|
|
||||||
def _collect_list_references(expression: Expression, list_names: set[str]) -> None:
|
def _collect_list_references(expression: Expression, list_names: set[str]) -> None:
|
||||||
"""Collect list reference names recursively."""
|
"""Collect list reference names recursively."""
|
||||||
if isinstance(expression, Sequence):
|
if isinstance(expression, Group):
|
||||||
seq: Sequence = expression
|
grp: Group = expression
|
||||||
for item in seq.items:
|
for item in grp.items:
|
||||||
_collect_list_references(item, list_names)
|
_collect_list_references(item, list_names)
|
||||||
elif isinstance(expression, ListReference):
|
elif isinstance(expression, ListReference):
|
||||||
# {list}
|
# {list}
|
||||||
|
@@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/assist_satellite",
|
"documentation": "https://www.home-assistant.io/integrations/assist_satellite",
|
||||||
"integration_type": "entity",
|
"integration_type": "entity",
|
||||||
"quality_scale": "internal",
|
"quality_scale": "internal",
|
||||||
"requirements": ["hassil==2.2.3"]
|
"requirements": ["hassil==3.1.0"]
|
||||||
}
|
}
|
||||||
|
@@ -14,7 +14,7 @@ import re
|
|||||||
import time
|
import time
|
||||||
from typing import IO, Any, cast
|
from typing import IO, Any, cast
|
||||||
|
|
||||||
from hassil.expression import Expression, ListReference, Sequence, TextChunk
|
from hassil.expression import Expression, Group, ListReference, TextChunk
|
||||||
from hassil.intents import (
|
from hassil.intents import (
|
||||||
Intents,
|
Intents,
|
||||||
SlotList,
|
SlotList,
|
||||||
@@ -1183,7 +1183,7 @@ class DefaultAgent(ConversationEntity):
|
|||||||
for trigger_intent in trigger_intents.intents.values():
|
for trigger_intent in trigger_intents.intents.values():
|
||||||
for intent_data in trigger_intent.data:
|
for intent_data in trigger_intent.data:
|
||||||
for sentence in intent_data.sentences:
|
for sentence in intent_data.sentences:
|
||||||
_collect_list_references(sentence, wildcard_names)
|
_collect_list_references(sentence.expression, wildcard_names)
|
||||||
|
|
||||||
for wildcard_name in wildcard_names:
|
for wildcard_name in wildcard_names:
|
||||||
trigger_intents.slot_lists[wildcard_name] = WildcardSlotList(wildcard_name)
|
trigger_intents.slot_lists[wildcard_name] = WildcardSlotList(wildcard_name)
|
||||||
@@ -1520,9 +1520,9 @@ def _get_match_error_response(
|
|||||||
|
|
||||||
def _collect_list_references(expression: Expression, list_names: set[str]) -> None:
|
def _collect_list_references(expression: Expression, list_names: set[str]) -> None:
|
||||||
"""Collect list reference names recursively."""
|
"""Collect list reference names recursively."""
|
||||||
if isinstance(expression, Sequence):
|
if isinstance(expression, Group):
|
||||||
seq: Sequence = expression
|
grp: Group = expression
|
||||||
for item in seq.items:
|
for item in grp.items:
|
||||||
_collect_list_references(item, list_names)
|
_collect_list_references(item, list_names)
|
||||||
elif isinstance(expression, ListReference):
|
elif isinstance(expression, ListReference):
|
||||||
# {list}
|
# {list}
|
||||||
|
@@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/conversation",
|
"documentation": "https://www.home-assistant.io/integrations/conversation",
|
||||||
"integration_type": "system",
|
"integration_type": "system",
|
||||||
"quality_scale": "internal",
|
"quality_scale": "internal",
|
||||||
"requirements": ["hassil==2.2.3", "home-assistant-intents==2025.7.30"]
|
"requirements": ["hassil==3.1.0", "home-assistant-intents==2025.7.30"]
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ go2rtc-client==0.2.1
|
|||||||
ha-ffmpeg==3.2.2
|
ha-ffmpeg==3.2.2
|
||||||
habluetooth==5.0.1
|
habluetooth==5.0.1
|
||||||
hass-nabucasa==0.111.2
|
hass-nabucasa==0.111.2
|
||||||
hassil==2.2.3
|
hassil==3.1.0
|
||||||
home-assistant-bluetooth==1.13.1
|
home-assistant-bluetooth==1.13.1
|
||||||
home-assistant-frontend==20250811.0
|
home-assistant-frontend==20250811.0
|
||||||
home-assistant-intents==2025.7.30
|
home-assistant-intents==2025.7.30
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@@ -1140,7 +1140,7 @@ hass-splunk==0.1.1
|
|||||||
|
|
||||||
# homeassistant.components.assist_satellite
|
# homeassistant.components.assist_satellite
|
||||||
# homeassistant.components.conversation
|
# homeassistant.components.conversation
|
||||||
hassil==2.2.3
|
hassil==3.1.0
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate[astral]==1.1.2
|
hdate[astral]==1.1.2
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@@ -998,7 +998,7 @@ hass-nabucasa==0.111.2
|
|||||||
|
|
||||||
# homeassistant.components.assist_satellite
|
# homeassistant.components.assist_satellite
|
||||||
# homeassistant.components.conversation
|
# homeassistant.components.conversation
|
||||||
hassil==2.2.3
|
hassil==3.1.0
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate[astral]==1.1.2
|
hdate[astral]==1.1.2
|
||||||
|
2
script/hassfest/docker/Dockerfile
generated
2
script/hassfest/docker/Dockerfile
generated
@@ -31,7 +31,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.8.9,source=/uv,target=/bin/uv \
|
|||||||
PyTurboJPEG==1.8.0 \
|
PyTurboJPEG==1.8.0 \
|
||||||
go2rtc-client==0.2.1 \
|
go2rtc-client==0.2.1 \
|
||||||
ha-ffmpeg==3.2.2 \
|
ha-ffmpeg==3.2.2 \
|
||||||
hassil==2.2.3 \
|
hassil==3.1.0 \
|
||||||
home-assistant-intents==2025.7.30 \
|
home-assistant-intents==2025.7.30 \
|
||||||
mutagen==1.47.0 \
|
mutagen==1.47.0 \
|
||||||
pymicro-vad==1.0.1 \
|
pymicro-vad==1.0.1 \
|
||||||
|
Reference in New Issue
Block a user