Verify withings config (#26698)

This commit is contained in:
Paulus Schoutsen 2019-09-17 13:45:48 -07:00 committed by Bram Kragten
parent 46a55ed723
commit ef9b3321c1
3 changed files with 19 additions and 26 deletions

View file

@ -88,7 +88,10 @@ class WithingsFlowHandler(config_entries.ConfigFlow):
async def async_step_user(self, user_input=None):
"""Create an entry for selecting a profile."""
flow = self.hass.data.get(DATA_FLOW_IMPL, {})
flow = self.hass.data.get(DATA_FLOW_IMPL)
if not flow:
return self.async_abort(reason="no_flows")
if user_input:
return await self.async_step_auth(user_input)

View file

@ -12,6 +12,9 @@
},
"create_entry": {
"default": "Successfully authenticated with Withings for the selected profile."
},
"abort": {
"no_flows": "You need to configure Withings before being able to authenticate with it. Please read the documentation."
}
}
}
}