diff --git a/homeassistant/components/analytics/__init__.py b/homeassistant/components/analytics/__init__.py index c02c1a3a3b6..ee36aa78e63 100644 --- a/homeassistant/components/analytics/__init__.py +++ b/homeassistant/components/analytics/__init__.py @@ -6,12 +6,15 @@ import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.const import EVENT_HOMEASSISTANT_STARTED from homeassistant.core import Event, HassJob, HomeAssistant, callback +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_call_later, async_track_time_interval from homeassistant.helpers.typing import ConfigType from .analytics import Analytics from .const import ATTR_ONBOARDED, ATTR_PREFERENCES, DOMAIN, INTERVAL, PREFERENCE_SCHEMA +CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) + async def async_setup(hass: HomeAssistant, _: ConfigType) -> bool: """Set up the analytics integration.""" diff --git a/homeassistant/helpers/config_validation.py b/homeassistant/helpers/config_validation.py index e0924b928ca..bbe4e05fd34 100644 --- a/homeassistant/helpers/config_validation.py +++ b/homeassistant/helpers/config_validation.py @@ -1045,6 +1045,11 @@ def expand_condition_shorthand(value: Any | None) -> Any: # Schemas +def empty_config_schema(domain: str) -> vol.Schema: + """Return a config schema which accepts no configuration parameters.""" + return vol.Schema({vol.Optional(domain): vol.Schema({})}, extra=vol.ALLOW_EXTRA) + + PLATFORM_SCHEMA = vol.Schema( { vol.Required(CONF_PLATFORM): string,