mirror of
https://github.com/home-assistant/core.git
synced 2026-09-25 17:04:04 -04:00
Bump intents and add test (#182499)
Co-authored-by: Artur Pragacz <49985303+arturpragacz@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Artur Pragacz
Copilot Autofix powered by AI
parent
d6fa711f36
commit
37662b2925
@@ -9,6 +9,6 @@
|
||||
"requirements": [
|
||||
"gazetteer-matcher==1.1.0",
|
||||
"hassil==3.12.1",
|
||||
"home-assistant-intents==2026.8.28"
|
||||
"home-assistant-intents==2026.9.17"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ hass-nabucasa==2.7.0
|
||||
hassil==3.12.1
|
||||
home-assistant-bluetooth==2.0.0
|
||||
home-assistant-frontend==20260826.7
|
||||
home-assistant-intents==2026.8.28
|
||||
home-assistant-intents==2026.9.17
|
||||
httpx==0.28.1
|
||||
ifaddr==0.2.0
|
||||
Jinja2==3.1.6
|
||||
|
||||
Generated
+1
-1
@@ -28,7 +28,7 @@ ha-ffmpeg==3.2.2
|
||||
hass-nabucasa==2.7.0
|
||||
hassil==3.12.1
|
||||
home-assistant-bluetooth==2.0.0
|
||||
home-assistant-intents==2026.8.28
|
||||
home-assistant-intents==2026.9.17
|
||||
httpx==0.28.1
|
||||
ifaddr==0.2.0
|
||||
infrared-protocols==10.1.0
|
||||
|
||||
Generated
+1
-1
@@ -1327,7 +1327,7 @@ holidays==0.104
|
||||
home-assistant-frontend==20260826.7
|
||||
|
||||
# homeassistant.components.conversation
|
||||
home-assistant-intents==2026.8.28
|
||||
home-assistant-intents==2026.9.17
|
||||
|
||||
# homeassistant.components.homekit
|
||||
homekit-audio-proxy==1.2.1
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
'fa',
|
||||
'fi',
|
||||
'fr',
|
||||
'ga',
|
||||
'gl',
|
||||
'gu',
|
||||
'he',
|
||||
@@ -60,6 +61,7 @@
|
||||
'sr-Latn',
|
||||
'sv',
|
||||
'sw',
|
||||
'ta',
|
||||
'te',
|
||||
'th',
|
||||
'tr',
|
||||
|
||||
@@ -15,6 +15,7 @@ from homeassistant.components import (
|
||||
vacuum,
|
||||
valve,
|
||||
)
|
||||
from homeassistant.components.climate import intent as climate_intent
|
||||
from homeassistant.components.conversation import DOMAIN
|
||||
from homeassistant.components.cover import intent as cover_intent
|
||||
from homeassistant.components.homeassistant.exposed_entities import async_expose_entity
|
||||
@@ -511,6 +512,36 @@ async def test_climate_turn_on_off(
|
||||
assert call.data == {"entity_id": [entity_id]}
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_components")
|
||||
async def test_climate_set_fan_mode(hass: HomeAssistant) -> None:
|
||||
"""Test setting the fan mode of a climate device by name."""
|
||||
await climate_intent.async_setup_intents(hass)
|
||||
|
||||
entity_id = f"{climate.DOMAIN}.thermostat"
|
||||
hass.states.async_set(
|
||||
entity_id,
|
||||
climate.HVACMode.COOL,
|
||||
attributes={
|
||||
ATTR_SUPPORTED_FEATURES: climate.ClimateEntityFeature.FAN_MODE,
|
||||
climate.ATTR_FAN_MODE: "low",
|
||||
climate.ATTR_FAN_MODES: ["auto", "low", "high"],
|
||||
},
|
||||
)
|
||||
async_expose_entity(hass, conversation.DOMAIN, entity_id, True)
|
||||
|
||||
calls = async_mock_service(hass, climate.DOMAIN, climate.SERVICE_SET_FAN_MODE)
|
||||
result = await conversation.async_converse(
|
||||
hass, "set thermostat fan to high", None, Context(), None
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
response = result.response
|
||||
assert response.response_type is intent.IntentResponseType.ACTION_DONE
|
||||
assert len(calls) == 1
|
||||
call = calls[0]
|
||||
assert call.data == {"entity_id": entity_id, "fan_mode": "high"}
|
||||
|
||||
|
||||
@pytest.mark.freeze_time(
|
||||
datetime(
|
||||
year=2013,
|
||||
|
||||
Reference in New Issue
Block a user