2021-03-01 08:41:04 +00:00
|
|
|
"""Config flow for Home Assistant Supervisor integration."""
|
2024-01-08 09:08:09 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2021-03-01 08:41:04 +00:00
|
|
|
import logging
|
2024-01-08 09:08:09 +00:00
|
|
|
from typing import Any
|
2021-03-01 08:41:04 +00:00
|
|
|
|
|
|
|
from homeassistant import config_entries
|
2024-01-08 09:08:09 +00:00
|
|
|
from homeassistant.data_entry_flow import FlowResult
|
2021-03-01 08:41:04 +00:00
|
|
|
|
2021-03-02 08:02:04 +00:00
|
|
|
from . import DOMAIN
|
2021-03-01 08:41:04 +00:00
|
|
|
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|
|
|
"""Handle a config flow for Home Assistant Supervisor."""
|
|
|
|
|
|
|
|
VERSION = 1
|
|
|
|
|
2024-01-08 09:08:09 +00:00
|
|
|
async def async_step_system(
|
|
|
|
self, user_input: dict[str, Any] | None = None
|
|
|
|
) -> FlowResult:
|
2021-03-01 08:41:04 +00:00
|
|
|
"""Handle the initial step."""
|
|
|
|
# We only need one Hass.io config entry
|
|
|
|
await self.async_set_unique_id(DOMAIN)
|
|
|
|
self._abort_if_unique_id_configured()
|
2021-04-06 22:46:47 +00:00
|
|
|
return self.async_create_entry(title="Supervisor", data={})
|