mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
Add transmission-integration path and protocol (#104334)
This updates the config_flow migration from v1.1 to v1.2 including migration tests
This commit is contained in:
@ -13,7 +13,14 @@ from homeassistant.config_entries import (
|
||||
ConfigFlowResult,
|
||||
OptionsFlow,
|
||||
)
|
||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PASSWORD,
|
||||
CONF_PATH,
|
||||
CONF_PORT,
|
||||
CONF_SSL,
|
||||
CONF_USERNAME,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
|
||||
from . import get_api
|
||||
@ -23,7 +30,9 @@ from .const import (
|
||||
DEFAULT_LIMIT,
|
||||
DEFAULT_NAME,
|
||||
DEFAULT_ORDER,
|
||||
DEFAULT_PATH,
|
||||
DEFAULT_PORT,
|
||||
DEFAULT_SSL,
|
||||
DOMAIN,
|
||||
SUPPORTED_ORDER_MODES,
|
||||
)
|
||||
@ -31,7 +40,9 @@ from .errors import AuthenticationError, CannotConnect, UnknownError
|
||||
|
||||
DATA_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Optional(CONF_SSL, default=DEFAULT_SSL): bool,
|
||||
vol.Required(CONF_HOST): str,
|
||||
vol.Required(CONF_PATH, default=DEFAULT_PATH): str,
|
||||
vol.Optional(CONF_USERNAME): str,
|
||||
vol.Optional(CONF_PASSWORD): str,
|
||||
vol.Required(CONF_PORT, default=DEFAULT_PORT): int,
|
||||
@ -43,6 +54,7 @@ class TransmissionFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle Tansmission config flow."""
|
||||
|
||||
VERSION = 1
|
||||
MINOR_VERSION = 2
|
||||
_reauth_entry: ConfigEntry | None
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user