From 8e70446ef8ad6e224e9f18cb83ef119077ce8ecc Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 25 Apr 2023 18:50:37 +0200 Subject: [PATCH] Tweak a couple of `stt` and `tts` related asserts (#92012) Tweak a couple of stt and tts related asserts --- homeassistant/components/assist_pipeline/pipeline.py | 2 +- homeassistant/components/tts/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/assist_pipeline/pipeline.py b/homeassistant/components/assist_pipeline/pipeline.py index faa1953cb94..cb00fe8852e 100644 --- a/homeassistant/components/assist_pipeline/pipeline.py +++ b/homeassistant/components/assist_pipeline/pipeline.py @@ -362,7 +362,7 @@ class PipelineRun: code="stt-provider-unsupported-metadata", message=( f"Provider {stt_provider.name} does not support input speech " - "to text metadata {metadata}" + f"to text metadata {metadata}" ), ) diff --git a/homeassistant/components/tts/__init__.py b/homeassistant/components/tts/__init__.py index 7c9750c8c5c..6d667563ac9 100644 --- a/homeassistant/components/tts/__init__.py +++ b/homeassistant/components/tts/__init__.py @@ -488,7 +488,7 @@ class SpeechManager: or engine_instance.supported_languages is None or language not in engine_instance.supported_languages ): - raise HomeAssistantError(f"Not supported language {language}") + raise HomeAssistantError(f"Language '{language}' not supported") # Options if (default_options := engine_instance.default_options) and options: