From 93a4b9d3f9743be8a64454e1d51ae6b4d8c1dea8 Mon Sep 17 00:00:00 2001 From: partach Date: Sun, 3 May 2026 17:52:18 +0000 Subject: [PATCH] Add CONFIG_SCHEMA for hassfest validation Integrations implementing async_setup must define CONFIG_SCHEMA. Since this integration can only be set up via config entries, use cv.config_entry_only_config_schema. https://claude.ai/code/session_0141XkQRjcng4RKLD4Yv5FAr --- custom_components/protocol_wizard/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/protocol_wizard/__init__.py b/custom_components/protocol_wizard/__init__.py index 637729d..31ea8cb 100644 --- a/custom_components/protocol_wizard/__init__.py +++ b/custom_components/protocol_wizard/__init__.py @@ -8,7 +8,7 @@ import asyncio import re -from homeassistant.helpers import device_registry as dr, entity_registry as er +from homeassistant.helpers import device_registry as dr, entity_registry as er, config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform @@ -65,6 +65,9 @@ PLATFORMS = [Platform.SENSOR, Platform.NUMBER, Platform.SELECT, Platform.SWITCH] +# This integration can only be set up via config entries +CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) + async def async_install_frontend_resource(hass: HomeAssistant): """Ensure the frontend JS file is copied to the www/community folder."""