fix: Add support for response_variable in ask_question service

- Added response schema definition in services.yaml for ask_question service
- Set supports_response=True flag when registering the service
- Fixed JSON syntax error in English translation file
- Added comprehensive documentation with examples for response_variable usage
- Users can now capture AI responses directly in variables without sensor delays

Resolves issue where scripts failed with 'Script does not support response_variable' error
This commit is contained in:
SMKRV
2025-09-02 01:19:44 +03:00
parent 7e3daf611b
commit ed8f19bfa9
4 changed files with 185 additions and 3 deletions
+2 -1
View File
@@ -188,7 +188,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
DOMAIN,
SERVICE_ASK_QUESTION,
async_ask_question,
schema=SERVICE_SCHEMA_ASK_QUESTION
schema=SERVICE_SCHEMA_ASK_QUESTION,
supports_response=True
)
hass.services.async_register(