Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
epenet
e2ff51240b Improve type hints in aussie_broadband 2024-11-13 09:28:24 +00:00

View file

@ -22,13 +22,14 @@ class AussieBroadbandConfigFlow(ConfigFlow, domain=DOMAIN):
VERSION = 1 VERSION = 1
_reauth_username: str
def __init__(self) -> None: def __init__(self) -> None:
"""Initialize the config flow.""" """Initialize the config flow."""
self.data: dict = {} self.data: dict = {}
self.options: dict = {CONF_SERVICES: []} self.options: dict = {CONF_SERVICES: []}
self.services: list[dict[str, Any]] = [] self.services: list[dict[str, Any]] = []
self.client: AussieBB | None = None self.client: AussieBB | None = None
self._reauth_username: str | None = None
async def async_auth(self, user_input: dict[str, str]) -> dict[str, str] | None: async def async_auth(self, user_input: dict[str, str]) -> dict[str, str] | None:
"""Reusable Auth Helper.""" """Reusable Auth Helper."""
@ -92,7 +93,7 @@ class AussieBroadbandConfigFlow(ConfigFlow, domain=DOMAIN):
errors: dict[str, str] | None = None errors: dict[str, str] | None = None
if user_input and self._reauth_username: if user_input:
data = { data = {
CONF_USERNAME: self._reauth_username, CONF_USERNAME: self._reauth_username,
CONF_PASSWORD: user_input[CONF_PASSWORD], CONF_PASSWORD: user_input[CONF_PASSWORD],