Migrate integrations u-z to generic flowhandler (#111866)

This commit is contained in:
Erik Montnemery 2024-02-29 20:08:16 +01:00 committed by GitHub
parent e06446d0fa
commit 9ec9ac4fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 577 additions and 454 deletions

View file

@ -7,10 +7,9 @@ from typing import Any
from vallox_websocket_api import Vallox, ValloxApiException
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_HOST, CONF_NAME
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from homeassistant.util.network import is_ip_address
@ -35,14 +34,14 @@ async def validate_host(hass: HomeAssistant, host: str) -> None:
await client.fetch_metric_data()
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
class ValloxConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for the Vallox integration."""
VERSION = 1
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
) -> ConfigFlowResult:
"""Handle the initial step."""
if user_input is None:
return self.async_show_form(