diff --git a/custom_components/mqtt_basic_async/__init__.py b/custom_components/mqtt_basic_async/__init__.py index f482cf5..5124cfc 100644 --- a/custom_components/mqtt_basic_async/__init__.py +++ b/custom_components/mqtt_basic_async/__init__.py @@ -31,9 +31,18 @@ DEFAULT_TOPIC = 'home-assistant/mqtt_example' # Schema to validate the configured MQTT topic -CONFIG_SCHEMA = vol.Schema({ - vol.Optional(CONF_TOPIC, default=DEFAULT_TOPIC): mqtt.valid_subscribe_topic -}) +CONFIG_SCHEMA = vol.Schema( + { + DOMAIN: vol.Schema( + { + vol.Optional( + CONF_TOPIC, default=DEFAULT_TOPIC + ): mqtt.valid_subscribe_topic + } + ) + }, + extra=vol.ALLOW_EXTRA, +) async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: