mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use intent responses from home-assistant-intents (#86484)
* Use intent responses from home_assistant_intents * Use error responses from home_assistant_intents * Remove speech checks for intent tests (set by conversation now) * Bump hassil and home-assistant-intents versions * Use Home Assistant JSON reader when loading intents * Remove speech checks for light tests (done in agent) * Add more tests for code coverage * Add test for reloading on new component * Add test for non-default response
This commit is contained in:
@@ -286,7 +286,7 @@ class ServiceIntentHandler(IntentHandler):
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self, intent_type: str, domain: str, service: str, speech: str
|
||||
self, intent_type: str, domain: str, service: str, speech: str | None = None
|
||||
) -> None:
|
||||
"""Create Service Intent Handler."""
|
||||
self.intent_type = intent_type
|
||||
@@ -382,7 +382,9 @@ class ServiceIntentHandler(IntentHandler):
|
||||
response.async_set_results(
|
||||
success_results=success_results,
|
||||
)
|
||||
response.async_set_speech(self.speech.format(speech_name))
|
||||
|
||||
if self.speech is not None:
|
||||
response.async_set_speech(self.speech.format(speech_name))
|
||||
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user