diff --git a/homeassistant/components/application_credentials/__init__.py b/homeassistant/components/application_credentials/__init__.py index 22deb124859..623706ce5bb 100644 --- a/homeassistant/components/application_credentials/__init__.py +++ b/homeassistant/components/application_credentials/__init__.py @@ -15,7 +15,7 @@ from typing import Any, Protocol import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_CLIENT_ID, diff --git a/homeassistant/components/calendar/__init__.py b/homeassistant/components/calendar/__init__.py index b94a6eb935f..3e33f077e93 100644 --- a/homeassistant/components/calendar/__init__.py +++ b/homeassistant/components/calendar/__init__.py @@ -16,8 +16,11 @@ from dateutil.rrule import rrulestr import voluptuous as vol from homeassistant.components import frontend, http, websocket_api -from homeassistant.components.websocket_api import ERR_NOT_FOUND, ERR_NOT_SUPPORTED -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ( + ERR_NOT_FOUND, + ERR_NOT_SUPPORTED, + ActiveConnection, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.core import ( diff --git a/homeassistant/components/config/category_registry.py b/homeassistant/components/config/category_registry.py index ade35fddadc..27268928823 100644 --- a/homeassistant/components/config/category_registry.py +++ b/homeassistant/components/config/category_registry.py @@ -5,7 +5,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import category_registry as cr, config_validation as cv diff --git a/homeassistant/components/config/device_registry.py b/homeassistant/components/config/device_registry.py index 8bc9133b0df..8b114041672 100644 --- a/homeassistant/components/config/device_registry.py +++ b/homeassistant/components/config/device_registry.py @@ -8,7 +8,7 @@ import voluptuous as vol from homeassistant import loader from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.decorators import require_admin +from homeassistant.components.websocket_api import require_admin from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import device_registry as dr diff --git a/homeassistant/components/config/entity_registry.py b/homeassistant/components/config/entity_registry.py index bf7a9087d56..aed04943975 100644 --- a/homeassistant/components/config/entity_registry.py +++ b/homeassistant/components/config/entity_registry.py @@ -8,8 +8,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import websocket_api -from homeassistant.components.websocket_api import ERR_NOT_FOUND -from homeassistant.components.websocket_api.decorators import require_admin +from homeassistant.components.websocket_api import ERR_NOT_FOUND, require_admin from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import ( config_validation as cv, diff --git a/homeassistant/components/config/floor_registry.py b/homeassistant/components/config/floor_registry.py index f3c9793d25e..afa74e7f9b8 100644 --- a/homeassistant/components/config/floor_registry.py +++ b/homeassistant/components/config/floor_registry.py @@ -5,7 +5,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import floor_registry as fr from homeassistant.helpers.floor_registry import FloorEntry diff --git a/homeassistant/components/config/label_registry.py b/homeassistant/components/config/label_registry.py index d02b9849d46..f60a3fca245 100644 --- a/homeassistant/components/config/label_registry.py +++ b/homeassistant/components/config/label_registry.py @@ -5,7 +5,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_validation as cv, label_registry as lr from homeassistant.helpers.label_registry import LabelEntry diff --git a/homeassistant/components/device_automation/__init__.py b/homeassistant/components/device_automation/__init__.py index 5e196f40aa1..b54fe788a3d 100644 --- a/homeassistant/components/device_automation/__init__.py +++ b/homeassistant/components/device_automation/__init__.py @@ -15,7 +15,7 @@ import voluptuous as vol import voluptuous_serialize from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.const import ( ATTR_ENTITY_ID, CONF_DEVICE_ID, diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index c5df84cf549..e6e26a661ae 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -16,7 +16,7 @@ from yarl import URL from homeassistant.components import onboarding, websocket_api from homeassistant.components.http import KEY_HASS, HomeAssistantView, StaticPathConfig -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.config import async_hass_config_yaml from homeassistant.const import ( CONF_MODE, diff --git a/homeassistant/components/frontend/storage.py b/homeassistant/components/frontend/storage.py index d387e14b085..cbcc3024aa7 100644 --- a/homeassistant/components/frontend/storage.py +++ b/homeassistant/components/frontend/storage.py @@ -9,7 +9,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.storage import Store diff --git a/homeassistant/components/hassio/websocket_api.py b/homeassistant/components/hassio/websocket_api.py index 03ca424035c..954d9ee8a02 100644 --- a/homeassistant/components/hassio/websocket_api.py +++ b/homeassistant/components/hassio/websocket_api.py @@ -8,7 +8,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import Unauthorized import homeassistant.helpers.config_validation as cv diff --git a/homeassistant/components/history/websocket_api.py b/homeassistant/components/history/websocket_api.py index 465416607a2..c85d975c3c9 100644 --- a/homeassistant/components/history/websocket_api.py +++ b/homeassistant/components/history/websocket_api.py @@ -13,8 +13,7 @@ import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.recorder import get_instance, history -from homeassistant.components.websocket_api import messages -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection, messages from homeassistant.const import ( COMPRESSED_STATE_ATTRIBUTES, COMPRESSED_STATE_LAST_CHANGED, diff --git a/homeassistant/components/logbook/websocket_api.py b/homeassistant/components/logbook/websocket_api.py index b776ad6303d..b295b845532 100644 --- a/homeassistant/components/logbook/websocket_api.py +++ b/homeassistant/components/logbook/websocket_api.py @@ -13,8 +13,7 @@ import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.recorder import get_instance -from homeassistant.components.websocket_api import messages -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection, messages from homeassistant.core import CALLBACK_TYPE, Event, HomeAssistant, callback from homeassistant.helpers.event import async_track_point_in_utc_time from homeassistant.helpers.json import json_bytes diff --git a/homeassistant/components/logger/websocket_api.py b/homeassistant/components/logger/websocket_api.py index 6d34b10bd34..2430f187a6f 100644 --- a/homeassistant/components/logger/websocket_api.py +++ b/homeassistant/components/logger/websocket_api.py @@ -5,7 +5,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from homeassistant.loader import IntegrationNotFound, async_get_integration from homeassistant.setup import async_get_loaded_integrations diff --git a/homeassistant/components/network/websocket.py b/homeassistant/components/network/websocket.py index 78626b893e4..b97bd2d58d1 100644 --- a/homeassistant/components/network/websocket.py +++ b/homeassistant/components/network/websocket.py @@ -7,7 +7,7 @@ from typing import Any import voluptuous as vol from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.core import HomeAssistant, callback from .const import ATTR_ADAPTERS, ATTR_CONFIGURED_ADAPTERS, NETWORK_CONFIG_SCHEMA diff --git a/homeassistant/components/usb/__init__.py b/homeassistant/components/usb/__init__.py index d4201d7f284..2da72d16ac6 100644 --- a/homeassistant/components/usb/__init__.py +++ b/homeassistant/components/usb/__init__.py @@ -16,7 +16,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import websocket_api -from homeassistant.components.websocket_api.connection import ActiveConnection +from homeassistant.components.websocket_api import ActiveConnection from homeassistant.const import EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP from homeassistant.core import ( CALLBACK_TYPE, diff --git a/homeassistant/components/zha/websocket_api.py b/homeassistant/components/zha/websocket_api.py index 0d4296e4b22..5ffd7117d93 100644 --- a/homeassistant/components/zha/websocket_api.py +++ b/homeassistant/components/zha/websocket_api.py @@ -94,7 +94,7 @@ from .helpers import ( ) if TYPE_CHECKING: - from homeassistant.components.websocket_api.connection import ActiveConnection + from homeassistant.components.websocket_api import ActiveConnection _LOGGER = logging.getLogger(__name__)