Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
829af754
Unverified
Commit
829af754
authored
6 months ago
by
epenet
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Use _get_reauth_entry in bring config flow (#127325)
parent
c306ebed
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homeassistant/components/bring/config_flow.py
+2
-6
2 additions, 6 deletions
homeassistant/components/bring/config_flow.py
with
2 additions
and
6 deletions
homeassistant/components/bring/config_flow.py
+
2
−
6
View file @
829af754
...
@@ -50,7 +50,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
...
@@ -50,7 +50,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
"""
Handle a config flow for Bring!.
"""
"""
Handle a config flow for Bring!.
"""
VERSION
=
1
VERSION
=
1
reauth_entry
:
BringConfigEntry
|
None
=
None
reauth_entry
:
BringConfigEntry
info
:
BringAuthResponse
info
:
BringAuthResponse
async
def
async_step_user
(
async
def
async_step_user
(
...
@@ -74,9 +74,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
...
@@ -74,9 +74,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
self
,
entry_data
:
Mapping
[
str
,
Any
]
self
,
entry_data
:
Mapping
[
str
,
Any
]
)
->
ConfigFlowResult
:
)
->
ConfigFlowResult
:
"""
Perform reauth upon an API authentication error.
"""
"""
Perform reauth upon an API authentication error.
"""
self
.
reauth_entry
=
self
.
hass
.
config_entries
.
async_get_entry
(
self
.
reauth_entry
=
self
.
_get_reauth_entry
()
self
.
context
[
"
entry_id
"
]
)
return
await
self
.
async_step_reauth_confirm
()
return
await
self
.
async_step_reauth_confirm
()
async
def
async_step_reauth_confirm
(
async
def
async_step_reauth_confirm
(
...
@@ -85,8 +83,6 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
...
@@ -85,8 +83,6 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
"""
Dialog that informs the user that reauth is required.
"""
"""
Dialog that informs the user that reauth is required.
"""
errors
:
dict
[
str
,
str
]
=
{}
errors
:
dict
[
str
,
str
]
=
{}
assert
self
.
reauth_entry
if
user_input
is
not
None
:
if
user_input
is
not
None
:
if
not
(
errors
:
=
await
self
.
validate_input
(
user_input
)):
if
not
(
errors
:
=
await
self
.
validate_input
(
user_input
)):
return
self
.
async_update_reload_and_abort
(
return
self
.
async_update_reload_and_abort
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment