Skip to content

Commit

Permalink
Add optional refresh token to BMW config flow
Browse files Browse the repository at this point in the history
  • Loading branch information
rikroe committed Oct 6, 2024
1 parent 4003e93 commit ea36d14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions homeassistant/components/bmw_connected_drive/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
translation_key="regions",
)
),
vol.Optional(CONF_REFRESH_TOKEN): str,
}
)

Expand All @@ -49,6 +50,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
data[CONF_USERNAME],
data[CONF_PASSWORD],
get_region_from_name(data[CONF_REGION]),
refresh_token=data.get(CONF_REFRESH_TOKEN),
)

try:
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/bmw_connected_drive/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]",
"region": "ConnectedDrive Region"
"region": "ConnectedDrive Region",
"refresh_token": "Optional refresh token. Required for China."
}
}
},
Expand Down

0 comments on commit ea36d14

Please sign in to comment.