fix: Resolve hassfest validation errors in services.yaml

- Remove invalid response schema from ask_question service
- Add required target configuration for all services
- Ensure compliance with Home Assistant service schema requirements
This commit is contained in:
SMKRV
2025-09-01 17:20:40 +03:00
parent e427254584
commit 37919be70f
+16 -31
View File
@@ -4,6 +4,10 @@ ask_question:
Send a question to the AI model and receive a detailed response.
The response will be stored in the conversation history and can be retrieved later.
This service now returns response data directly, eliminating the need to read from sensors.
target:
entity:
integration: ha_text_ai
domain: sensor
fields:
instance:
name: Instance
@@ -73,42 +77,15 @@ ask_question:
max: 100000
step: 1
mode: box
response:
response_text:
description: "Full AI response text (unlimited length)"
example: "The answer to your question is..."
tokens_used:
description: "Total number of tokens consumed for this request"
example: 150
prompt_tokens:
description: "Number of tokens used for the input prompt"
example: 50
completion_tokens:
description: "Number of tokens used for the AI response"
example: 100
model_used:
description: "AI model that generated the response"
example: "gpt-4o-mini"
instance:
description: "Instance name that processed the request"
example: "my_assistant"
question:
description: "The original question that was asked"
example: "What is the weather like?"
timestamp:
description: "ISO timestamp when the response was generated"
example: "2025-01-09T16:57:00.000Z"
success:
description: "Whether the request was successful"
example: true
error:
description: "Error message if the request failed (only present when success is false)"
example: "API rate limit exceeded"
clear_history:
name: Clear History
description: >-
Delete all stored questions and responses from the conversation history
target:
entity:
integration: ha_text_ai
domain: sensor
fields:
instance:
name: Instance
@@ -122,6 +99,10 @@ clear_history:
get_history:
name: Get History
description: Retrieve conversation history with optional filtering and sorting
target:
entity:
integration: ha_text_ai
domain: sensor
fields:
instance:
name: Instance
@@ -182,6 +163,10 @@ get_history:
set_system_prompt:
name: Set System Prompt
description: Set default system behavior instructions for all future conversations
target:
entity:
integration: ha_text_ai
domain: sensor
fields:
instance:
name: Instance