mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Handle error when validating options in Google Cloud TTS (#120850)
This commit is contained in:
@@ -259,7 +259,11 @@ class GoogleCloudTTSProvider(Provider):
|
||||
vol.Optional(CONF_TEXT_TYPE, default=self._text_type): TEXT_TYPE_SCHEMA,
|
||||
}
|
||||
)
|
||||
options = options_schema(options)
|
||||
try:
|
||||
options = options_schema(options)
|
||||
except vol.Invalid as err:
|
||||
_LOGGER.error("Error: %s when validating options: %s", err, options)
|
||||
return None, None
|
||||
|
||||
encoding = options[CONF_ENCODING]
|
||||
gender = texttospeech.SsmlVoiceGender[options[CONF_GENDER]]
|
||||
|
Reference in New Issue
Block a user