Migrate integrations s-t to generic flowhandler (#111865)
This commit is contained in:
parent
e0c1feb22c
commit
b0ed8c4961
106 changed files with 792 additions and 661 deletions
|
@ -8,9 +8,8 @@ from solax import real_time_api
|
|||
from solax.discovery import DiscoveryError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD, CONF_PORT
|
||||
from homeassistant.data_entry_flow import FlowResult
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from .const import DOMAIN
|
||||
|
@ -39,12 +38,12 @@ async def validate_api(data) -> str:
|
|||
return response.serial_number
|
||||
|
||||
|
||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
class SolaxConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Solax."""
|
||||
|
||||
async def async_step_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> FlowResult:
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle the initial step."""
|
||||
errors: dict[str, Any] = {}
|
||||
if user_input is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue