Skip to content
This repository was archived by the owner on Jan 18, 2021. It is now read-only.

Commit 54e728c

Browse files
committed
Fall back to storage if yaml file does not exsist
1 parent 01dc88f commit 54e728c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

custom_components/custom_updater.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from homeassistant.components.http import HomeAssistantView
1515
from homeassistant.helpers.event import async_track_time_interval
1616

17-
VERSION = '4.2.9'
17+
VERSION = '4.2.10'
1818

1919
_LOGGER = logging.getLogger(__name__)
2020

@@ -69,6 +69,12 @@ async def async_setup(hass, config):
6969

7070
_LOGGER.debug('Version %s', VERSION)
7171
_LOGGER.debug('Mode %s', conf_mode)
72+
73+
if conf_mode == 'yaml':
74+
if not os.path.exists("{}/ui-lovelace.yaml".format(str(hass.config.path()))):
75+
_LOGGER.warning(
76+
"Configured to run with yaml mode but ui-lovelace.yaml does not exist, assuming storage is used")
77+
conf_mode = 'storage'
7278

7379
if 'cards' in conf_track:
7480
card_controller = CustomCards(

0 commit comments

Comments
 (0)