Skip to content
This repository has been archived by the owner on Jul 23, 2018. It is now read-only.

Commit

Permalink
Fixed bug where card and dir had the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 18, 2018
1 parent 2f4a626 commit ffa0371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/custom_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.helpers.discovery import load_platform
from homeassistant.helpers.dispatcher import async_dispatcher_send

__version__ = '1.1.13'
__version__ = '1.1.14'

DOMAIN = 'custom_cards'
DATA_CC = 'custom_cards_data'
Expand Down Expand Up @@ -185,7 +185,7 @@ def get_card_dir(self, card):
with open(self.conf_dir + '/ui-lovelace.yaml', 'r') as local:
for line in local.readlines():
if '/' + card + '.js' in line:
card_dir = line.split(': ')[1].split(card)[0].replace("local", "www")
card_dir = line.split(': ')[1].split(card + '.js')[0].replace("local", "www")
_LOGGER.debug('Found path "%s" for card "%s"', card_dir, card)
break
return card_dir
Expand Down

0 comments on commit ffa0371

Please sign in to comment.