diff --git a/esphome/components/micro_wake_word/__init__.py b/esphome/components/micro_wake_word/__init__.py index 9073d103f1..def2808e54 100644 --- a/esphome/components/micro_wake_word/__init__.py +++ b/esphome/components/micro_wake_word/__init__.py @@ -329,11 +329,14 @@ async def to_code(config): file: Path = base_dir / h.hexdigest()[:8] / model_config[CONF_FILE] elif model_config[CONF_TYPE] == TYPE_LOCAL: - file = model_config[CONF_PATH] + file = Path(model_config[CONF_PATH]) elif model_config[CONF_TYPE] == TYPE_HTTP: file = _compute_local_file_path(model_config) / "manifest.json" + else: + raise ValueError("Unsupported config type: {model_config[CONF_TYPE]}") + manifest, data = _load_model_data(file) rhs = [HexInt(x) for x in data]