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
56e79de7
Unverified
Commit
56e79de7
authored
6 months ago
by
epenet
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Use _get_reauth_entry in trafikverket_weatherstation (#127316)
parent
781c3eed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homeassistant/components/trafikverket_weatherstation/config_flow.py
+2
-4
2 additions, 4 deletions
...ant/components/trafikverket_weatherstation/config_flow.py
with
2 additions
and
4 deletions
homeassistant/components/trafikverket_weatherstation/config_flow.py
+
2
−
4
View file @
56e79de7
...
...
@@ -26,7 +26,7 @@ class TVWeatherConfigFlow(ConfigFlow, domain=DOMAIN):
VERSION
=
1
entry
:
ConfigEntry
|
None
=
None
entry
:
ConfigEntry
async
def
validate_input
(
self
,
sensor_api
:
str
,
station
:
str
)
->
None
:
"""
Validate input from user input.
"""
...
...
@@ -80,7 +80,7 @@ class TVWeatherConfigFlow(ConfigFlow, domain=DOMAIN):
)
->
ConfigFlowResult
:
"""
Handle re-authentication with Trafikverket.
"""
self
.
entry
=
self
.
hass
.
config_entries
.
async_get_entry
(
self
.
context
[
"
entry_id
"
]
)
self
.
entry
=
self
.
_get_reauth_entry
(
)
return
await
self
.
async_step_reauth_confirm
()
async
def
async_step_reauth_confirm
(
...
...
@@ -92,8 +92,6 @@ class TVWeatherConfigFlow(ConfigFlow, domain=DOMAIN):
if
user_input
:
api_key
=
user_input
[
CONF_API_KEY
]
assert
self
.
entry
is
not
None
try
:
await
self
.
validate_input
(
api_key
,
self
.
entry
.
data
[
CONF_STATION
])
except
InvalidAuthentication
:
...
...
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