Address comments

This commit is contained in:
Paulus Schoutsen
2025-06-24 00:55:42 +00:00
parent 33535ca27a
commit ae55288a26
3 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"services": {
"generate_data": {
"name": "Generate data",
"description": "Use AI to run a task that generates data.",
"description": "Uses AI to run a task that generates data.",
"fields": {
"task_name": {
"name": "Task name",

View File

@ -70,5 +70,6 @@ class GenDataTaskResult:
def as_dict(self) -> dict[str, Any]:
"""Return result as a dict."""
return {
"conversation_id": self.conversation_id,
"data": self.data,
}

View File

@ -71,6 +71,9 @@ async def test_run_task_preferred_entity(
instructions="Test prompt",
)
assert result.data == "Mock result"
as_dict = result.as_dict()
assert as_dict["conversation_id"] == result.conversation_id
assert as_dict["data"] == "Mock result"
state = hass.states.get(TEST_ENTITY_ID)
assert state is not None
assert state.state != STATE_UNKNOWN