Make config flow imports consistent (#114962)
* Make config flow imports consistent * Fix
This commit is contained in:
parent
aeaed83578
commit
0214511b38
18 changed files with 67 additions and 75 deletions
|
@ -8,8 +8,8 @@ from typing import Any
|
|||
from rabbitair import UdpClient
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components import zeroconf
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST, CONF_MAC
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
@ -49,7 +49,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
|
|||
return {"mac": info.mac}
|
||||
|
||||
|
||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
class RabbitAirConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Rabbit Air."""
|
||||
|
||||
VERSION = 1
|
||||
|
@ -58,7 +58,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
async def async_step_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> config_entries.ConfigFlowResult:
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle the initial step."""
|
||||
errors = {}
|
||||
|
||||
|
@ -100,7 +100,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
async def async_step_zeroconf(
|
||||
self, discovery_info: zeroconf.ZeroconfServiceInfo
|
||||
) -> config_entries.ConfigFlowResult:
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle zeroconf discovery."""
|
||||
mac = dr.format_mac(discovery_info.properties["id"])
|
||||
await self.async_set_unique_id(mac)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue