Skip to content

Commit

Permalink
Update config_flow.py - fixed api key length
Browse files Browse the repository at this point in the history
  • Loading branch information
sfortis authored May 4, 2024
1 parent a22cf0f commit fdb808b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/openai_tts/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

async def validate_input(user_input: dict):
""" Function to validate provided data"""
if len(user_input[CONF_API_KEY]) != 51:
api_key_length = len(user_input['CONF_API_KEY'])
if not (51 <= api_key_length <= 56):
raise WrongAPIKey


Expand Down

0 comments on commit fdb808b

Please sign in to comment.