mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Add empty config schema to integrations a-c (#93608)
This commit is contained in:
parent
171ce747c1
commit
8053073a77
@ -28,7 +28,7 @@ from homeassistant.const import (
|
|||||||
import homeassistant.core as ha
|
import homeassistant.core as ha
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ServiceNotFound, TemplateError, Unauthorized
|
from homeassistant.exceptions import ServiceNotFound, TemplateError, Unauthorized
|
||||||
from homeassistant.helpers import template
|
from homeassistant.helpers import config_validation as cv, template
|
||||||
from homeassistant.helpers.json import json_dumps
|
from homeassistant.helpers.json import json_dumps
|
||||||
from homeassistant.helpers.service import async_get_all_descriptions
|
from homeassistant.helpers.service import async_get_all_descriptions
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
@ -49,6 +49,8 @@ DOMAIN = "api"
|
|||||||
STREAM_PING_PAYLOAD = "ping"
|
STREAM_PING_PAYLOAD = "ping"
|
||||||
STREAM_PING_INTERVAL = 50 # seconds
|
STREAM_PING_INTERVAL = 50 # seconds
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Register the API with the HTTP interface."""
|
"""Register the API with the HTTP interface."""
|
||||||
|
@ -57,6 +57,8 @@ CREATE_FIELDS = {
|
|||||||
}
|
}
|
||||||
UPDATE_FIELDS: dict = {} # Not supported
|
UPDATE_FIELDS: dict = {} # Not supported
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ClientCredential:
|
class ClientCredential:
|
||||||
|
@ -5,6 +5,7 @@ from collections.abc import AsyncIterable
|
|||||||
|
|
||||||
from homeassistant.components import stt
|
from homeassistant.components import stt
|
||||||
from homeassistant.core import Context, HomeAssistant
|
from homeassistant.core import Context, HomeAssistant
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
@ -35,6 +36,8 @@ __all__ = (
|
|||||||
"PipelineEventType",
|
"PipelineEventType",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the Assist pipeline integration."""
|
"""Set up the Assist pipeline integration."""
|
||||||
|
@ -149,6 +149,7 @@ from homeassistant.components.http.ban import log_invalid_auth
|
|||||||
from homeassistant.components.http.data_validator import RequestDataValidator
|
from homeassistant.components.http.data_validator import RequestDataValidator
|
||||||
from homeassistant.components.http.view import HomeAssistantView
|
from homeassistant.components.http.view import HomeAssistantView
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2AuthorizeCallbackView
|
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2AuthorizeCallbackView
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
from homeassistant.loader import bind_hass
|
from homeassistant.loader import bind_hass
|
||||||
@ -161,6 +162,8 @@ DOMAIN = "auth"
|
|||||||
StoreResultType = Callable[[str, Credentials], str]
|
StoreResultType = Callable[[str, Credentials], str]
|
||||||
RetrieveResultType = Callable[[str, str], Credentials | None]
|
RetrieveResultType = Callable[[str, str], Credentials | None]
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
@bind_hass
|
@bind_hass
|
||||||
def create_auth_code(
|
def create_auth_code(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""The Backup integration."""
|
"""The Backup integration."""
|
||||||
from homeassistant.components.hassio import is_hassio
|
from homeassistant.components.hassio import is_hassio
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from .const import DOMAIN, LOGGER
|
from .const import DOMAIN, LOGGER
|
||||||
@ -8,6 +9,8 @@ from .http import async_register_http_views
|
|||||||
from .manager import BackupManager
|
from .manager import BackupManager
|
||||||
from .websocket import async_register_websocket_handlers
|
from .websocket import async_register_websocket_handlers
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the Backup integration."""
|
"""Set up the Backup integration."""
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""The blueprint integration."""
|
"""The blueprint integration."""
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from . import websocket_api
|
from . import websocket_api
|
||||||
@ -15,6 +16,8 @@ from .errors import ( # noqa: F401
|
|||||||
from .models import Blueprint, BlueprintInputs, DomainBlueprints # noqa: F401
|
from .models import Blueprint, BlueprintInputs, DomainBlueprints # noqa: F401
|
||||||
from .schemas import is_blueprint_instance_config # noqa: F401
|
from .schemas import is_blueprint_instance_config # noqa: F401
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the blueprint integration."""
|
"""Set up the blueprint integration."""
|
||||||
|
@ -33,7 +33,11 @@ from homeassistant.config_entries import (
|
|||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import Event, HassJob, HomeAssistant, callback as hass_callback
|
from homeassistant.core import Event, HassJob, HomeAssistant, callback as hass_callback
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
from homeassistant.helpers import device_registry as dr, discovery_flow
|
from homeassistant.helpers import (
|
||||||
|
config_validation as cv,
|
||||||
|
device_registry as dr,
|
||||||
|
discovery_flow,
|
||||||
|
)
|
||||||
from homeassistant.helpers.debounce import Debouncer
|
from homeassistant.helpers.debounce import Debouncer
|
||||||
from homeassistant.helpers.event import async_call_later
|
from homeassistant.helpers.event import async_call_later
|
||||||
from homeassistant.helpers.issue_registry import (
|
from homeassistant.helpers.issue_registry import (
|
||||||
@ -119,6 +123,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
RECOMMENDED_MIN_HAOS_VERSION = AwesomeVersion("9.0.dev0")
|
RECOMMENDED_MIN_HAOS_VERSION = AwesomeVersion("9.0.dev0")
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def _async_get_adapter_from_address(
|
async def _async_get_adapter_from_address(
|
||||||
hass: HomeAssistant, address: str
|
hass: HomeAssistant, address: str
|
||||||
|
@ -2,10 +2,13 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
DOMAIN = "bluetooth_adapters"
|
DOMAIN = "bluetooth_adapters"
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up Bluetooth Adapters from a config entry.
|
"""Set up Bluetooth Adapters from a config entry.
|
||||||
|
@ -4,6 +4,7 @@ import webbrowser
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
ATTR_URL = "url"
|
ATTR_URL = "url"
|
||||||
@ -20,6 +21,8 @@ SERVICE_BROWSE_URL_SCHEMA = vol.Schema(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
def _browser_url(service: ServiceCall) -> None:
|
def _browser_url(service: ServiceCall) -> None:
|
||||||
"""Browse to URL."""
|
"""Browse to URL."""
|
||||||
|
@ -24,6 +24,8 @@ from .const import ATTR_PATH, ATTR_URL, DOMAIN, SERVICE_TURN_ON
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
# Extend the existing light.turn_on service schema
|
# Extend the existing light.turn_on service schema
|
||||||
SERVICE_SCHEMA = vol.All(
|
SERVICE_SCHEMA = vol.All(
|
||||||
cv.has_at_least_one_key(ATTR_URL, ATTR_PATH),
|
cv.has_at_least_one_key(ATTR_URL, ATTR_PATH),
|
||||||
|
@ -11,6 +11,7 @@ from homeassistant.components.http import HomeAssistantView
|
|||||||
from homeassistant.const import CONF_ID, EVENT_COMPONENT_LOADED
|
from homeassistant.const import CONF_ID, EVENT_COMPONENT_LOADED
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
from homeassistant.setup import ATTR_COMPONENT
|
from homeassistant.setup import ATTR_COMPONENT
|
||||||
from homeassistant.util.file import write_utf8_file_atomic
|
from homeassistant.util.file import write_utf8_file_atomic
|
||||||
@ -32,6 +33,8 @@ SECTIONS = (
|
|||||||
ACTION_CREATE_UPDATE = "create_update"
|
ACTION_CREATE_UPDATE = "create_update"
|
||||||
ACTION_DELETE = "delete"
|
ACTION_DELETE = "delete"
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the config component."""
|
"""Set up the config component."""
|
||||||
|
@ -15,6 +15,7 @@ from typing import Any
|
|||||||
|
|
||||||
from homeassistant.const import ATTR_ENTITY_PICTURE, ATTR_FRIENDLY_NAME
|
from homeassistant.const import ATTR_ENTITY_PICTURE, ATTR_FRIENDLY_NAME
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall, callback as async_callback
|
from homeassistant.core import HomeAssistant, ServiceCall, callback as async_callback
|
||||||
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.entity import async_generate_entity_id
|
from homeassistant.helpers.entity import async_generate_entity_id
|
||||||
from homeassistant.helpers.event import async_call_later
|
from homeassistant.helpers.event import async_call_later
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
@ -44,6 +45,8 @@ STATE_CONFIGURED = "configured"
|
|||||||
|
|
||||||
ConfiguratorCallback = Callable[[list[dict[str, str]]], None]
|
ConfiguratorCallback = Callable[[list[dict[str, str]]], None]
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
@bind_hass
|
@bind_hass
|
||||||
@async_callback
|
@async_callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user