Delete config_flow.py
This commit is contained in:
@@ -1,36 +0,0 @@
|
|||||||
"""Config flow for Dispatcharr Sensor integration."""
|
|
||||||
from __future__ import annotations
|
|
||||||
import logging
|
|
||||||
from typing import Any
|
|
||||||
import voluptuous as vol
|
|
||||||
from homeassistant import config_entries
|
|
||||||
from homeassistant.data_entry_flow import FlowResult
|
|
||||||
from .const import DOMAIN
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
# Ask for username and password instead of API token
|
|
||||||
STEP_USER_DATA_SCHEMA = vol.Schema(
|
|
||||||
{
|
|
||||||
vol.Required("host"): str,
|
|
||||||
vol.Required("port", default=9191): int,
|
|
||||||
vol.Required("username"): str,
|
|
||||||
vol.Required("password"): str,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|
||||||
"""Handle a config flow for Dispatcharr Sensor."""
|
|
||||||
|
|
||||||
VERSION = 1
|
|
||||||
|
|
||||||
async def async_step_user(
|
|
||||||
self, user_input: dict[str, Any] | None = None
|
|
||||||
) -> FlowResult:
|
|
||||||
"""Handle the initial step."""
|
|
||||||
if user_input is None:
|
|
||||||
return self.async_show_form(
|
|
||||||
step_id="user", data_schema=STEP_USER_DATA_SCHEMA
|
|
||||||
)
|
|
||||||
|
|
||||||
return self.async_create_entry(title="Dispatcharr", data=user_input)
|
|
||||||
Reference in New Issue
Block a user