Skip to content

Commit

Permalink
Add an options flow for session options and the reauth form
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Andrieu de Levis authored and Delmael committed Jan 9, 2025
1 parent ec13e3e commit b442cda
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/smartbox/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
import requests
import voluptuous as vol

from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
FlowResult,
OptionsFlow,
)
from homeassistant.core import callback
from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
Expand Down
10 changes: 10 additions & 0 deletions custom_components/smartbox/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
"basic_auth_creds": "[%key:common::config_flow::data::basic_auth_creds%]",
"x_referer": "[%key:common::config_flow::data::x_referer%]",
"x_serialid": "[%key:common::config_flow::data::x_serialid%]"
"x_serialid": "[%key:common::config_flow::data::x_serialid%]"
},
"data_description": {
"api_name": "[%key:common::config_flow::data_description::api_name%]",
"basic_auth_creds": "[%key:common::config_flow::data_description::basic_auth_creds%]"
"basic_auth_creds": "[%key:common::config_flow::data_description::basic_auth_creds%]"
}
},
"reauth_confirm": {
Expand All @@ -24,12 +26,20 @@
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
"description": "[%key:common::config_flow::description::reauth%]",
"data": {
"username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
}
}
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%] {error}",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%] {error}",
"unknown": "[%key:common::config_flow::error::unknown%] {error}"
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%] {error}",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%] {error}",
"unknown": "[%key:common::config_flow::error::unknown%] {error}"
},
"abort": {
"unknown": "[%key:common::config_flow::error::unknown%]",
Expand Down

0 comments on commit b442cda

Please sign in to comment.