mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 03:07:50 +00:00
Context slot decisions moved into hassil (#104132)
This commit is contained in:
parent
fd7f75e9af
commit
8c99cf14d3
@ -224,18 +224,11 @@ class DefaultAgent(AbstractConversationAgent):
|
||||
# loaded in async_recognize.
|
||||
assert lang_intents is not None
|
||||
|
||||
# Include slot values from intent_context, such as the name of the
|
||||
# device's area.
|
||||
# Slot values to pass to the intent
|
||||
slots = {
|
||||
entity_name: {"value": entity_value}
|
||||
for entity_name, entity_value in result.context.items()
|
||||
entity.name: {"value": entity.value} for entity in result.entities_list
|
||||
}
|
||||
|
||||
# Override context with result entities
|
||||
slots.update(
|
||||
{entity.name: {"value": entity.value} for entity in result.entities_list}
|
||||
)
|
||||
|
||||
try:
|
||||
intent_response = await intent.async_handle(
|
||||
self.hass,
|
||||
|
@ -7,5 +7,5 @@
|
||||
"integration_type": "system",
|
||||
"iot_class": "local_push",
|
||||
"quality_scale": "internal",
|
||||
"requirements": ["hassil==1.5.0", "home-assistant-intents==2023.11.13"]
|
||||
"requirements": ["hassil==1.5.1", "home-assistant-intents==2023.11.17"]
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ fnv-hash-fast==0.5.0
|
||||
ha-av==10.1.1
|
||||
ha-ffmpeg==3.1.0
|
||||
hass-nabucasa==0.74.0
|
||||
hassil==1.5.0
|
||||
hassil==1.5.1
|
||||
home-assistant-bluetooth==1.10.4
|
||||
home-assistant-frontend==20231030.2
|
||||
home-assistant-intents==2023.11.13
|
||||
home-assistant-intents==2023.11.17
|
||||
httpx==0.25.0
|
||||
ifaddr==0.2.0
|
||||
janus==1.0.0
|
||||
|
@ -985,7 +985,7 @@ hass-nabucasa==0.74.0
|
||||
hass-splunk==0.1.1
|
||||
|
||||
# homeassistant.components.conversation
|
||||
hassil==1.5.0
|
||||
hassil==1.5.1
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.10.4
|
||||
@ -1018,7 +1018,7 @@ holidays==0.36
|
||||
home-assistant-frontend==20231030.2
|
||||
|
||||
# homeassistant.components.conversation
|
||||
home-assistant-intents==2023.11.13
|
||||
home-assistant-intents==2023.11.17
|
||||
|
||||
# homeassistant.components.home_connect
|
||||
homeconnect==0.7.2
|
||||
|
@ -778,7 +778,7 @@ habitipy==0.2.0
|
||||
hass-nabucasa==0.74.0
|
||||
|
||||
# homeassistant.components.conversation
|
||||
hassil==1.5.0
|
||||
hassil==1.5.1
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.10.4
|
||||
@ -802,7 +802,7 @@ holidays==0.36
|
||||
home-assistant-frontend==20231030.2
|
||||
|
||||
# homeassistant.components.conversation
|
||||
home-assistant-intents==2023.11.13
|
||||
home-assistant-intents==2023.11.17
|
||||
|
||||
# homeassistant.components.home_connect
|
||||
homeconnect==0.7.2
|
||||
|
@ -343,10 +343,10 @@ async def test_device_area_context(
|
||||
)
|
||||
device_registry.async_update_device(bedroom_satellite.id, area_id=area_bedroom.id)
|
||||
|
||||
# Turn on all lights in the area of a device
|
||||
# Turn on lights in the area of a device
|
||||
result = await conversation.async_converse(
|
||||
hass,
|
||||
"turn on all lights",
|
||||
"turn on the lights",
|
||||
None,
|
||||
Context(),
|
||||
None,
|
||||
@ -367,7 +367,7 @@ async def test_device_area_context(
|
||||
# Ensure we can still target other areas by name
|
||||
result = await conversation.async_converse(
|
||||
hass,
|
||||
"turn on all lights in the bedroom",
|
||||
"turn on lights in the bedroom",
|
||||
None,
|
||||
Context(),
|
||||
None,
|
||||
@ -388,7 +388,7 @@ async def test_device_area_context(
|
||||
# Turn off all lights in the area of the otherkj device
|
||||
result = await conversation.async_converse(
|
||||
hass,
|
||||
"turn all lights off",
|
||||
"turn lights off",
|
||||
None,
|
||||
Context(),
|
||||
None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user