mirror of
https://github.com/esphome/esphome.git
synced 2025-01-03 03:11:44 +01:00
[micro_wake_word] Ensure model string is Path (#6826)
This commit is contained in:
parent
a7fc1a6298
commit
c130ddbe9c
1 changed files with 4 additions and 1 deletions
|
@ -329,11 +329,14 @@ async def to_code(config):
|
||||||
file: Path = base_dir / h.hexdigest()[:8] / model_config[CONF_FILE]
|
file: Path = base_dir / h.hexdigest()[:8] / model_config[CONF_FILE]
|
||||||
|
|
||||||
elif model_config[CONF_TYPE] == TYPE_LOCAL:
|
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:
|
elif model_config[CONF_TYPE] == TYPE_HTTP:
|
||||||
file = _compute_local_file_path(model_config) / "manifest.json"
|
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)
|
manifest, data = _load_model_data(file)
|
||||||
|
|
||||||
rhs = [HexInt(x) for x in data]
|
rhs = [HexInt(x) for x in data]
|
||||||
|
|
Loading…
Reference in a new issue