diff --git a/homeassistant/components/conversation/manifest.json b/homeassistant/components/conversation/manifest.json index 00f645ea0f3..7f3c4f5894e 100644 --- a/homeassistant/components/conversation/manifest.json +++ b/homeassistant/components/conversation/manifest.json @@ -7,5 +7,5 @@ "integration_type": "system", "iot_class": "local_push", "quality_scale": "internal", - "requirements": ["hassil==1.6.1", "home-assistant-intents==2024.3.12"] + "requirements": ["hassil==1.6.1", "home-assistant-intents==2024.3.27"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index fa16d1ddeba..1f89aed7306 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -31,7 +31,7 @@ hass-nabucasa==0.79.0 hassil==1.6.1 home-assistant-bluetooth==1.12.0 home-assistant-frontend==20240307.0 -home-assistant-intents==2024.3.12 +home-assistant-intents==2024.3.27 httpx==0.27.0 ifaddr==0.2.0 Jinja2==3.1.3 diff --git a/requirements_all.txt b/requirements_all.txt index 0ab9ed75e09..c3106479617 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1080,7 +1080,7 @@ holidays==0.45 home-assistant-frontend==20240307.0 # homeassistant.components.conversation -home-assistant-intents==2024.3.12 +home-assistant-intents==2024.3.27 # homeassistant.components.home_connect homeconnect==0.7.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 86242be4db4..efaa3a8ad30 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -879,7 +879,7 @@ holidays==0.45 home-assistant-frontend==20240307.0 # homeassistant.components.conversation -home-assistant-intents==2024.3.12 +home-assistant-intents==2024.3.27 # homeassistant.components.home_connect homeconnect==0.7.2 diff --git a/tests/components/conversation/test_default_agent.py b/tests/components/conversation/test_default_agent.py index 4b4f9ade3eb..aefb37f427e 100644 --- a/tests/components/conversation/test_default_agent.py +++ b/tests/components/conversation/test_default_agent.py @@ -331,6 +331,7 @@ async def test_device_area_context( # Create 2 lights in each area area_lights = defaultdict(list) + all_lights = [] for area in (area_kitchen, area_bedroom): for i in range(2): light_entity = entity_registry.async_get_or_create( @@ -345,6 +346,7 @@ async def test_device_area_context( attributes={ATTR_FRIENDLY_NAME: f"{area.name} light {i}"}, ) area_lights[area.id].append(light_entity) + all_lights.append(light_entity) # Create voice satellites in each area entry = MockConfigEntry() @@ -412,7 +414,7 @@ async def test_device_area_context( } turn_on_calls.clear() - # Turn off all lights in the area of the otherkj device + # Turn off all lights in the area of the other device result = await conversation.async_converse( hass, "turn lights off", @@ -436,16 +438,18 @@ async def test_device_area_context( } turn_off_calls.clear() - # Not providing a device id should not match + # Turn on/off all lights also works for command in ("on", "off"): result = await conversation.async_converse( hass, f"turn {command} all lights", None, Context(), None ) - assert result.response.response_type == intent.IntentResponseType.ERROR - assert ( - result.response.error_code - == intent.IntentResponseErrorCode.NO_VALID_TARGETS - ) + await hass.async_block_till_done() + assert result.response.response_type == intent.IntentResponseType.ACTION_DONE + + # All lights should have been targeted + assert {s.entity_id for s in result.response.matched_states} == { + e.entity_id for e in all_lights + } async def test_error_no_device(hass: HomeAssistant, init_components) -> None: