Skip to content

Commit

Permalink
Revert "Fix enum lookup (#125220)" (#127680)
Browse files Browse the repository at this point in the history
This reverts commit 1bc63a6.
  • Loading branch information
cdce8p authored Oct 5, 2024
1 parent d58b2d1 commit 229ad8b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions homeassistant/components/google_cloud/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ async def _async_get_tts_audio(
_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
Expand Down

0 comments on commit 229ad8b

Please sign in to comment.