mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Bump intents and add HassRespond test (#129830)
This commit is contained in:
parent
adf836d9ac
commit
48d9df89ac
@ -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==1.7.4", "home-assistant-intents==2024.10.30"]
|
"requirements": ["hassil==1.7.4", "home-assistant-intents==2024.11.4"]
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ hass-nabucasa==0.83.0
|
|||||||
hassil==1.7.4
|
hassil==1.7.4
|
||||||
home-assistant-bluetooth==1.13.0
|
home-assistant-bluetooth==1.13.0
|
||||||
home-assistant-frontend==20241105.0
|
home-assistant-frontend==20241105.0
|
||||||
home-assistant-intents==2024.10.30
|
home-assistant-intents==2024.11.4
|
||||||
httpx==0.27.2
|
httpx==0.27.2
|
||||||
ifaddr==0.2.0
|
ifaddr==0.2.0
|
||||||
Jinja2==3.1.4
|
Jinja2==3.1.4
|
||||||
|
@ -1127,7 +1127,7 @@ holidays==0.60
|
|||||||
home-assistant-frontend==20241105.0
|
home-assistant-frontend==20241105.0
|
||||||
|
|
||||||
# homeassistant.components.conversation
|
# homeassistant.components.conversation
|
||||||
home-assistant-intents==2024.10.30
|
home-assistant-intents==2024.11.4
|
||||||
|
|
||||||
# homeassistant.components.home_connect
|
# homeassistant.components.home_connect
|
||||||
homeconnect==0.8.0
|
homeconnect==0.8.0
|
||||||
|
@ -953,7 +953,7 @@ holidays==0.60
|
|||||||
home-assistant-frontend==20241105.0
|
home-assistant-frontend==20241105.0
|
||||||
|
|
||||||
# homeassistant.components.conversation
|
# homeassistant.components.conversation
|
||||||
home-assistant-intents==2024.10.30
|
home-assistant-intents==2024.11.4
|
||||||
|
|
||||||
# homeassistant.components.home_connect
|
# homeassistant.components.home_connect
|
||||||
homeconnect==0.8.0
|
homeconnect==0.8.0
|
||||||
|
@ -23,7 +23,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.4.28,source=/uv,target=/bin/uv \
|
|||||||
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
|
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
|
||||||
-r /usr/src/homeassistant/requirements.txt \
|
-r /usr/src/homeassistant/requirements.txt \
|
||||||
stdlib-list==0.10.0 pipdeptree==2.23.4 tqdm==4.66.5 ruff==0.7.1 \
|
stdlib-list==0.10.0 pipdeptree==2.23.4 tqdm==4.66.5 ruff==0.7.1 \
|
||||||
PyTurboJPEG==1.7.5 ha-ffmpeg==3.2.1 hassil==1.7.4 home-assistant-intents==2024.10.30 mutagen==1.47.0 pymicro-vad==1.0.1 pyspeex-noise==1.0.2
|
PyTurboJPEG==1.7.5 ha-ffmpeg==3.2.1 hassil==1.7.4 home-assistant-intents==2024.11.4 mutagen==1.47.0 pymicro-vad==1.0.1 pyspeex-noise==1.0.2
|
||||||
|
|
||||||
LABEL "name"="hassfest"
|
LABEL "name"="hassfest"
|
||||||
LABEL "maintainer"="Home Assistant <hello@home-assistant.io>"
|
LABEL "maintainer"="Home Assistant <hello@home-assistant.io>"
|
||||||
|
@ -431,7 +431,7 @@ async def test_shopping_list_add_item(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("init_components")
|
@pytest.mark.usefixtures("init_components")
|
||||||
async def test_nevermind_item(hass: HomeAssistant) -> None:
|
async def test_nevermind_intent(hass: HomeAssistant) -> None:
|
||||||
"""Test HassNevermind intent through the default agent."""
|
"""Test HassNevermind intent through the default agent."""
|
||||||
result = await conversation.async_converse(hass, "nevermind", None, Context())
|
result = await conversation.async_converse(hass, "nevermind", None, Context())
|
||||||
assert result.response.intent is not None
|
assert result.response.intent is not None
|
||||||
@ -441,6 +441,17 @@ async def test_nevermind_item(hass: HomeAssistant) -> None:
|
|||||||
assert not result.response.speech
|
assert not result.response.speech
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("init_components")
|
||||||
|
async def test_respond_intent(hass: HomeAssistant) -> None:
|
||||||
|
"""Test HassRespond intent through the default agent."""
|
||||||
|
result = await conversation.async_converse(hass, "hello", None, Context())
|
||||||
|
assert result.response.intent is not None
|
||||||
|
assert result.response.intent.intent_type == intent.INTENT_RESPOND
|
||||||
|
|
||||||
|
assert result.response.response_type == intent.IntentResponseType.ACTION_DONE
|
||||||
|
assert result.response.speech["plain"]["speech"] == "Hello from Home Assistant."
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("init_components")
|
@pytest.mark.usefixtures("init_components")
|
||||||
async def test_device_area_context(
|
async def test_device_area_context(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -455,3 +455,14 @@ async def test_set_position_intent_unsupported_domain(hass: HomeAssistant) -> No
|
|||||||
"HassSetPosition",
|
"HassSetPosition",
|
||||||
{"name": {"value": "test light"}, "position": {"value": 100}},
|
{"name": {"value": "test light"}, "position": {"value": 100}},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def test_intents_with_no_responses(hass: HomeAssistant) -> None:
|
||||||
|
"""Test intents that should not return a response during handling."""
|
||||||
|
assert await async_setup_component(hass, "homeassistant", {})
|
||||||
|
assert await async_setup_component(hass, "intent", {})
|
||||||
|
|
||||||
|
# The "respond" intent gets its response text from home-assistant-intents
|
||||||
|
for intent_name in (intent.INTENT_NEVERMIND, intent.INTENT_RESPOND):
|
||||||
|
response = await intent.async_handle(hass, "test", intent_name, {})
|
||||||
|
assert not response.speech
|
||||||
|
Loading…
x
Reference in New Issue
Block a user