Improved logging

This commit is contained in:
2022-10-17 13:43:11 +02:00
parent b2592a2f4c
commit 2a1bb9ee63
2 changed files with 22 additions and 14 deletions

View File

@@ -22,14 +22,12 @@ class PlejdConfigFlow(ConfigFlow, domain="plejd"):
}
)
)
_LOGGER.info("Log in with %s %s", info["username"], info["password"])
self.credentials = info
return await self.async_step_picksite()
async def async_step_picksite(self, info=None):
if info is None:
sites = await api.get_sites(self.credentials["username"], self.credentials["password"])
_LOGGER.info(sites)
return self.async_show_form(
step_id="picksite",
data_schema=vol.Schema(
@@ -48,5 +46,4 @@ class PlejdConfigFlow(ConfigFlow, domain="plejd"):
"password": self.credentials["password"],
"siteId": info["site"]
}
_LOGGER.debug("Saving: %s", data)
return self.async_create_entry(title="Plejd", data=data)
return self.async_create_entry(title="Plejd", data=data)