23 lines
653 B
Python
23 lines
653 B
Python
"""Config flow for AWS component."""
|
|
|
|
from collections.abc import Mapping
|
|
from typing import Any
|
|
|
|
from homeassistant import config_entries
|
|
from homeassistant.data_entry_flow import FlowResult
|
|
|
|
from .const import DOMAIN
|
|
|
|
|
|
class AWSFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|
"""Handle a config flow."""
|
|
|
|
VERSION = 1
|
|
|
|
async def async_step_import(self, user_input: Mapping[str, Any]) -> FlowResult:
|
|
"""Import a config entry."""
|
|
if self._async_current_entries():
|
|
return self.async_abort(reason="single_instance_allowed")
|
|
|
|
return self.async_create_entry(title="configuration.yaml", data=user_input)
|