mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 16:37:52 +01:00
[micro_wake_word] Ensure model string is Path (#6826)
This commit is contained in:
parent
a7fc1a6298
commit
c130ddbe9c
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user