diff --git a/homeassistant/config.py b/homeassistant/config.py index dd5e16f42dec5..2d90838cb9d49 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -559,6 +559,9 @@ def _log_pkg_error(package: str, component: str, config: Dict, message: str) -> def _identify_config_schema(module: ModuleType) -> Optional[str]: """Extract the schema and identify list or dict based.""" + if not isinstance(module.CONFIG_SCHEMA, vol.Schema): # type: ignore + return None + schema = module.CONFIG_SCHEMA.schema # type: ignore if isinstance(schema, vol.All): diff --git a/tests/test_config.py b/tests/test_config.py index ab9eeb639e689..e374ab3ae6984 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -28,6 +28,7 @@ __version__, ) from homeassistant.core import SOURCE_STORAGE, HomeAssistantError +from homeassistant.helpers import config_validation as cv import homeassistant.helpers.check_config as check_config from homeassistant.helpers.entity import Entity from homeassistant.loader import async_get_integration @@ -1029,6 +1030,7 @@ async def test_component_config_exceptions(hass, caplog): ("non_existing", vol.Schema({"zone": int}), None), ("zone", vol.Schema({}), None), ("plex", vol.Schema(vol.All({"plex": {"host": str}})), "dict"), + ("openuv", cv.deprecated("openuv", invalidation_version="0.115"), None), ], ) def test_identify_config_schema(domain, schema, expected):