core/homeassistant/components/aws/config_flow.py

24 lines
634 B
Python
Raw Normal View History

"""Config flow for AWS component."""
2023-12-27 11:51:24 +00:00
from collections.abc import Mapping
from typing import Any
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from .const import DOMAIN
class AWSFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
async def async_step_import(
self, user_input: Mapping[str, Any]
) -> ConfigFlowResult:
"""Import a config entry."""
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
2019-07-31 19:25:30 +00:00
return self.async_create_entry(title="configuration.yaml", data=user_input)