mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 06:15:47 -04:00
Fix flow
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
"""Config flow for Min/Max integration."""
|
||||
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, cast
|
||||
|
||||
import probatio
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -82,15 +79,13 @@ OPTIONS_SCHEMA = vol.Schema(
|
||||
CONFIG_SCHEMA = vol.Schema({})
|
||||
|
||||
|
||||
async def migrate_to_groups(
|
||||
handler: SchemaCommonFlowHandler, user_input: dict[str, Any]
|
||||
) -> dict[str, Any]:
|
||||
async def migrate_to_groups(handler: SchemaCommonFlowHandler) -> vol.Schema:
|
||||
"""Abort flow as migrate to groups."""
|
||||
raise AbortFlow("migrated_to_groups")
|
||||
|
||||
|
||||
CONFIG_FLOW = {
|
||||
"user": SchemaFlowFormStep(CONFIG_SCHEMA, validate_user_input=migrate_to_groups),
|
||||
"user": SchemaFlowFormStep(migrate_to_groups),
|
||||
}
|
||||
|
||||
OPTIONS_FLOW = {
|
||||
@@ -104,7 +99,3 @@ class ConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
||||
config_flow = CONFIG_FLOW
|
||||
options_flow = OPTIONS_FLOW
|
||||
options_flow_reloads = True
|
||||
|
||||
def async_config_entry_title(self, options: Mapping[str, Any]) -> str:
|
||||
"""Return config entry title."""
|
||||
return cast(str, options["name"]) if "name" in options else ""
|
||||
|
||||
Reference in New Issue
Block a user