From 229ad8be83763b3668aa2a1e8047ab3c75e14836 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 6 Oct 2024 00:46:50 +0200 Subject: [PATCH] Revert "Fix enum lookup (#125220)" (#127680) This reverts commit 1bc63a61be8057850f68e0ff4e0c94563d5a41c9. --- homeassistant/components/google_cloud/tts.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/google_cloud/tts.py b/homeassistant/components/google_cloud/tts.py index e7bb899361a..c3a8254ad90 100644 --- a/homeassistant/components/google_cloud/tts.py +++ b/homeassistant/components/google_cloud/tts.py @@ -172,10 +172,12 @@ class BaseGoogleCloudProvider: _LOGGER.error("Error: %s when validating options: %s", err, options) return None, None - encoding = texttospeech.AudioEncoding(options[CONF_ENCODING]) - gender: texttospeech.SsmlVoiceGender | None = texttospeech.SsmlVoiceGender( + encoding: texttospeech.AudioEncoding = texttospeech.AudioEncoding[ + options[CONF_ENCODING] + ] # type: ignore[misc] + gender: texttospeech.SsmlVoiceGender | None = texttospeech.SsmlVoiceGender[ options[CONF_GENDER] - ) + ] # type: ignore[misc] voice = options[CONF_VOICE] if voice: gender = None -- GitLab