Add conversation agent selector, use in conversation.process service (#95462)

This commit is contained in:
Bram Kragten
2023-06-29 13:44:13 -04:00
committed by Paulus Schoutsen
parent a39ef03ff5
commit be22195cf4
3 changed files with 51 additions and 1 deletions
+22
View File
@@ -979,3 +979,25 @@ def test_constant_selector_schema_error(schema) -> None:
"""Test constant selector."""
with pytest.raises(vol.Invalid):
selector.validate_selector({"constant": schema})
@pytest.mark.parametrize(
("schema", "valid_selections", "invalid_selections"),
(
(
{},
("home_assistant", "2j4hp3uy4p87wyrpiuhk34"),
(None, True, 1),
),
(
{"language": "nl"},
("home_assistant", "2j4hp3uy4p87wyrpiuhk34"),
(None, True, 1),
),
),
)
def test_conversation_agent_selector_schema(
schema, valid_selections, invalid_selections
) -> None:
"""Test conversation agent selector."""
_test_selector("conversation_agent", schema, valid_selections, invalid_selections)