Explicitly define all methods in ConfigFlow (#49341)

This commit is contained in:
Ruslan Sayfutdinov 2021-04-17 11:42:31 +01:00 committed by GitHub
parent 189511724a
commit 7a9385d857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 88 additions and 59 deletions

View file

@ -59,12 +59,12 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Initialize the powerwall flow."""
self.ip_address = None
async def async_step_dhcp(self, dhcp_discovery):
async def async_step_dhcp(self, discovery_info):
"""Handle dhcp discovery."""
if self._async_ip_address_already_configured(dhcp_discovery[IP_ADDRESS]):
if self._async_ip_address_already_configured(discovery_info[IP_ADDRESS]):
return self.async_abort(reason="already_configured")
self.ip_address = dhcp_discovery[IP_ADDRESS]
self.ip_address = discovery_info[IP_ADDRESS]
self.context["title_placeholders"] = {CONF_IP_ADDRESS: self.ip_address}
return await self.async_step_user()