Fix zeroconf migration messing up ESPHome discovery (#24578)
This commit is contained in:
parent
ddeb6b6baa
commit
05bb645263
2 changed files with 33 additions and 3 deletions
|
@ -56,6 +56,7 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
|
|||
self.context['title_placeholders'] = {
|
||||
'name': self._name
|
||||
}
|
||||
self.context['name'] = self._name
|
||||
|
||||
# Only show authentication step if device uses password
|
||||
if device_info.uses_password:
|
||||
|
@ -98,9 +99,11 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
|
|||
already_configured = data.device_info.name == node_name
|
||||
|
||||
if already_configured:
|
||||
return self.async_abort(
|
||||
reason='already_configured'
|
||||
)
|
||||
return self.async_abort(reason='already_configured')
|
||||
|
||||
for flow in self._async_in_progress():
|
||||
if flow['context']['name'] == node_name:
|
||||
return self.async_abort(reason='already_configured')
|
||||
|
||||
return await self._async_authenticate_or_add(user_input={
|
||||
'host': address,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue