Clean up connection classes in integrations T-Z (#49894)

This commit is contained in:
Franck Nijhof 2021-05-01 09:04:05 +02:00 committed by GitHub
parent a6206b2819
commit 64c7d84108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 3 additions and 42 deletions

View File

@ -52,7 +52,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Tado."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
async def async_step_user(self, user_input=None):
"""Handle the initial step."""

View File

@ -11,7 +11,6 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize flow."""

View File

@ -33,7 +33,6 @@ class FlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
def __init__(self):
"""Init config flow."""

View File

@ -31,7 +31,6 @@ class TeslaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Tesla."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Initialize the tesla flow."""

View File

@ -18,7 +18,6 @@ class TibberConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Tibber integration."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
async def async_step_import(self, import_info):
"""Set the config entry up from yaml."""

View File

@ -14,7 +14,6 @@ class TileFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Tile config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Initialize the config flow."""

View File

@ -7,7 +7,6 @@ from typing import Any
from toonapi import Agreement, Toon, ToonError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.config_entry_oauth2_flow import AbstractOAuth2FlowHandler
@ -18,7 +17,6 @@ from .const import CONF_AGREEMENT, CONF_AGREEMENT_ID, CONF_MIGRATE, DOMAIN
class ToonFlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN):
"""Handle a Toon config flow."""
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_PUSH
DOMAIN = DOMAIN
VERSION = 2

View File

@ -41,7 +41,6 @@ class TransmissionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle Tansmission config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
@staticmethod
@callback

View File

@ -82,7 +82,6 @@ class TuyaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a tuya config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Initialize flow."""

View File

@ -10,7 +10,6 @@ from twentemilieu import (
)
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import ConfigFlow
from homeassistant.const import CONF_ID
from homeassistant.data_entry_flow import FlowResult
@ -23,7 +22,6 @@ class TwenteMilieuFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a Twente Milieu config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
async def _show_setup_form(
self, errors: dict[str, str] | None = None

View File

@ -59,7 +59,6 @@ class UnifiFlowHandler(config_entries.ConfigFlow, domain=UNIFI_DOMAIN):
"""Handle a UniFi config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
@staticmethod
@callback

View File

@ -75,7 +75,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for UPB PIM."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize the UPB config flow."""

View File

@ -19,7 +19,6 @@ class UpCloudConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""UpCloud config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
username: str
password: str

View File

@ -46,7 +46,6 @@ class UpnpFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a UPnP/IGD config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
# Paths:
# - ssdp(discovery_info) --> ssdp_confirm(None) --> ssdp_confirm({}) --> create_entry()

View File

@ -22,7 +22,6 @@ class VelbusConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self) -> None:
"""Initialize the velbus config flow."""

View File

@ -21,7 +21,6 @@ class VeSyncFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Instantiate config flow."""

View File

@ -106,7 +106,6 @@ class DomainConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Vilfo Router."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
async def async_step_user(self, user_input=None):
"""Handle the initial step."""

View File

@ -175,7 +175,6 @@ class VizioConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Vizio config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
@staticmethod
@callback

View File

@ -36,7 +36,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Volumio."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
def __init__(self):
"""Initialize flow."""

View File

@ -93,7 +93,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Waze Travel Time."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
@staticmethod
@callback

View File

@ -18,7 +18,6 @@ class WiffiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Wiffi server setup config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
@staticmethod
@callback

View File

@ -4,7 +4,7 @@ from urllib.parse import urlparse
import pywilight
from homeassistant.components import ssdp
from homeassistant.config_entries import CONN_CLASS_LOCAL_PUSH, ConfigFlow
from homeassistant.config_entries import ConfigFlow
from homeassistant.const import CONF_HOST
from . import DOMAIN
@ -22,7 +22,6 @@ class WiLightFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a WiLight config flow."""
VERSION = 1
CONNECTION_CLASS = CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize the WiLight flow."""

View File

@ -6,7 +6,6 @@ import logging
import voluptuous as vol
from withings_api.common import AuthScope
from homeassistant import config_entries
from homeassistant.components.withings import const
from homeassistant.config_entries import SOURCE_REAUTH
from homeassistant.helpers import config_entry_oauth2_flow
@ -19,7 +18,7 @@ class WithingsFlowHandler(
"""Handle a config flow."""
DOMAIN = const.DOMAIN
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
# Temporarily holds authorization data during the profile step.
_current_data: dict[str, None | str | int] = {}

View File

@ -4,11 +4,7 @@ from __future__ import annotations
import voluptuous as vol
from wled import WLED, WLEDConnectionError
from homeassistant.config_entries import (
CONN_CLASS_LOCAL_POLL,
SOURCE_ZEROCONF,
ConfigFlow,
)
from homeassistant.config_entries import SOURCE_ZEROCONF, ConfigFlow
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import async_get_clientsession
@ -21,7 +17,6 @@ class WLEDFlowHandler(ConfigFlow, domain=DOMAIN):
"""Handle a WLED config flow."""
VERSION = 1
CONNECTION_CLASS = CONN_CLASS_LOCAL_POLL
async def async_step_user(self, user_input: ConfigType | None = None) -> FlowResult:
"""Handle a flow initiated by the user."""

View File

@ -22,7 +22,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Wolf SmartSet Service."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Initialize with empty username and password."""

View File

@ -1,7 +1,6 @@
"""Config flow for xbox."""
import logging
from homeassistant import config_entries
from homeassistant.helpers import config_entry_oauth2_flow
from .const import DOMAIN
@ -13,7 +12,6 @@ class OAuth2FlowHandler(
"""Config flow to handle xbox OAuth2 authentication."""
DOMAIN = DOMAIN
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
@property
def logger(self) -> logging.Logger:

View File

@ -46,7 +46,6 @@ class XiaomiAqaraFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Xiaomi Aqara config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize."""

View File

@ -36,7 +36,6 @@ class XiaomiMiioFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Xiaomi Miio config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
def __init__(self):
"""Initialize."""

View File

@ -28,7 +28,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Yeelight."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
@staticmethod
@callback

View File

@ -31,7 +31,6 @@ class ZhaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow."""
VERSION = 2
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize flow instance."""

View File

@ -18,7 +18,6 @@ class ZwaveFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Z-Wave config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self):
"""Initialize the Z-Wave config flow."""

View File

@ -74,7 +74,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Z-Wave JS."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
def __init__(self) -> None:
"""Set up flow instance."""