Skip to content

Commit

Permalink
fix: build time error possibly caused by esphome 2024.6 (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Garfield Ip <garfield@thekingdom.com>
  • Loading branch information
kiddyfurby and 0xBURP authored Jul 12, 2024
1 parent d437b03 commit fde33e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/nspanel_lovelace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,9 @@ def AUTO_LOAD():

def load_icons():
global iconJson
iconJsonPath = core.CORE.relative_build_path("nspanel_icons.json")
current_directory = os.path.dirname(__file__)
iconJsonPath = os.path.join(current_directory, 'icons.json')
_LOGGER.debug(f"[nspanel_lovelace] Attempting to load icons from '{iconJsonPath}'")
if not os.path.exists(core.CORE.build_path):
os.mkdir(core.CORE.build_path)
try:
with open(iconJsonPath, encoding="utf-8") as read_file:
iconJson = json.load(read_file)
Expand Down

0 comments on commit fde33e2

Please sign in to comment.