Skip to content

Commit

Permalink
Fix config flow
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelAngelLV committed May 22, 2023
1 parent bd4393b commit d0a86c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/octopus_spain/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def async_step_user(

api = OctopusSpain(user_input[CONF_EMAIL], user_input[CONF_PASSWORD])
if await api.login():
return self.async_create_entry(data=user_input)
return self.async_create_entry(data=user_input, title="Octopus Spain")
else:
return self.async_show_form(step_id="user", data_schema=SCHEMA, errors={'base': 'invalid_auth'})

Expand Down Expand Up @@ -87,7 +87,7 @@ async def async_step_init(self, user_input=None):

api = OctopusSpain(user_input[CONF_EMAIL], user_input[CONF_PASSWORD])
if await api.login():
return self.async_create_entry(data=user_input)
return self.async_create_entry(data=user_input, title="Octopus Spain")
else:
return self.async_show_form(step_id="init", data_schema=SCHEMA, errors={'base': 'invalid_auth'})

0 comments on commit d0a86c4

Please sign in to comment.