Skip to content

Commit

Permalink
Fix file load failure for new filaments.json file.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGarside committed Oct 21, 2024
1 parent 8474191 commit 3894eb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/bambu_lab/pybambu/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import logging

from pathlib import Path
from enum import (
Enum,
IntEnum,
Expand Down Expand Up @@ -115,7 +116,7 @@ def load_dict(filename: str) -> dict:
return json.load(f);


FILAMENT_NAMES = load_dict("./filaments.json")
FILAMENT_NAMES = load_dict(Path(__file__).with_name('filaments.json'))

# TODO: Update error lists with data from https://e.bambulab.com/query.php?lang=en
# UNIQUE_ID=dAa5VFRi
Expand Down

0 comments on commit 3894eb7

Please sign in to comment.