mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Add empty config schema to integrations d-h (#93645)
This commit is contained in:
parent
9c01ea003c
commit
ef68f2c3ff
@ -1,11 +1,14 @@
|
||||
"""Component providing default configuration for new users."""
|
||||
from homeassistant.components.hassio import is_hassio
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
DOMAIN = "default_config"
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Initialize default configuration."""
|
||||
|
@ -14,6 +14,7 @@ from homeassistant.const import (
|
||||
)
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.core import Event, HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.discovery import async_load_platform
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
@ -56,6 +57,8 @@ COMPONENTS_WITH_DEMO_PLATFORM = [
|
||||
Platform.DEVICE_TRACKER,
|
||||
]
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the demo environment."""
|
||||
|
@ -57,6 +57,8 @@ if TYPE_CHECKING:
|
||||
|
||||
DOMAIN = "device_automation"
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
DEVICE_TRIGGER_BASE_SCHEMA: vol.Schema = cv.TRIGGER_BASE_SCHEMA.extend(
|
||||
{
|
||||
vol.Required(CONF_PLATFORM): "device",
|
||||
|
@ -42,7 +42,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.core import Event, HomeAssistant, State, callback
|
||||
from homeassistant.data_entry_flow import BaseServiceInfo
|
||||
from homeassistant.helpers import discovery_flow
|
||||
from homeassistant.helpers import config_validation as cv, discovery_flow
|
||||
from homeassistant.helpers.device_registry import (
|
||||
CONNECTION_NETWORK_MAC,
|
||||
DeviceRegistry,
|
||||
@ -59,10 +59,14 @@ from homeassistant.loader import DHCPMatcher, async_get_dhcp
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
from homeassistant.util.network import is_invalid, is_link_local, is_loopback
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from scapy.packet import Packet
|
||||
from scapy.sendrecv import AsyncSniffer
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
FILTER = "udp and (port 67 or 68)"
|
||||
REQUESTED_ADDR = "requested_addr"
|
||||
MESSAGE_TYPE = "message-type"
|
||||
|
@ -14,7 +14,7 @@ import voluptuous as vol
|
||||
from homeassistant.components import http, websocket_api
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import integration_platform
|
||||
from homeassistant.helpers import config_validation as cv, integration_platform
|
||||
from homeassistant.helpers.device_registry import DeviceEntry, async_get
|
||||
from homeassistant.helpers.json import (
|
||||
ExtendedJSONEncoder,
|
||||
@ -33,6 +33,9 @@ __all__ = ["REDACTED", "async_redact_data"]
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class DiagnosticsPlatformData:
|
||||
"""Diagnostic platform data."""
|
||||
|
@ -4,13 +4,15 @@ from __future__ import annotations
|
||||
from homeassistant.components import frontend
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers import config_validation as cv, discovery
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from . import websocket_api
|
||||
from .const import DOMAIN
|
||||
from .data import async_get_manager
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def is_configured(hass: HomeAssistant) -> bool:
|
||||
"""Return a boolean to indicate if energy is configured."""
|
||||
|
@ -17,6 +17,7 @@ from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.components.http.data_validator import RequestDataValidator
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
from homeassistant.core import Event, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.util import raise_if_invalid_filename
|
||||
from homeassistant.util.ulid import ulid_hex
|
||||
@ -27,6 +28,8 @@ ONE_MEGABYTE = 1024 * 1024
|
||||
MAX_SIZE = 100 * ONE_MEGABYTE
|
||||
TEMP_DIR_NAME = f"home-assistant-{DOMAIN}"
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
@contextmanager
|
||||
def process_uploaded_file(hass: HomeAssistant, file_id: str) -> Iterator[Path]:
|
||||
|
@ -2,11 +2,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from . import websocket_api
|
||||
from .const import DOMAIN
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up Hardware."""
|
||||
|
@ -60,6 +60,8 @@ SCHEMA_RELOAD_CONFIG_ENTRY = vol.All(
|
||||
|
||||
SHUTDOWN_SERVICES = (SERVICE_HOMEASSISTANT_STOP, SERVICE_HOMEASSISTANT_RESTART)
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: ha.HomeAssistant, config: ConfigType) -> bool: # noqa: C901
|
||||
"""Set up general services related to Home Assistant."""
|
||||
|
@ -12,6 +12,7 @@ from awesomeversion import AwesomeVersion, AwesomeVersionStrategy
|
||||
from homeassistant.components.hassio import get_supervisor_info, is_hassio
|
||||
from homeassistant.const import EVENT_COMPONENT_LOADED, __version__
|
||||
from homeassistant.core import Event, HomeAssistant, callback
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.debounce import Debouncer
|
||||
from homeassistant.helpers.issue_registry import (
|
||||
@ -28,6 +29,8 @@ DOMAIN = "homeassistant_alerts"
|
||||
UPDATE_INTERVAL = timedelta(hours=3)
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up alerts."""
|
||||
|
@ -2,8 +2,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
DOMAIN = "homeassistant_hardware"
|
||||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the component."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user