Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import os
import yaml

THIS_VERSION = "v7.14.30"
THIS_VERSION = "v7.14.31"
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S%z"
TIME_FORMAT_SECONDS = "%Y-%m-%dT%H:%M:%S.%f%z"
TIME_FORMAT_OCTOPUS = "%Y-%m-%d %H:%M:%S%z"
Expand Down Expand Up @@ -10349,9 +10349,8 @@ def sanity(self):
if not config_dir:
self.log("WARN: Unable to find config directory in roots {}".format(CONFIG_ROOTS))
passed = False
else:
app_dirs.append(config_dir)

app_dir = config_dir + "/apps"
appdaemon_config = config_dir + "/appdaemon.yaml"
if config_dir and os.path.exists(appdaemon_config):
with open(appdaemon_config, "r") as han:
Expand All @@ -10366,12 +10365,9 @@ def sanity(self):
sub_data = data["appdaemon"]
if "app_dir" in sub_data:
app_dir = sub_data["app_dir"]
if app_dir not in app_dirs:
app_dirs.append(app_dir)
self.log("Sanity: Got app_dir {}".format(app_dir))
else:
self.log("WARN: app_dir is not set in appdaemon.yaml")
passed = False
if app_dir not in app_dirs:
app_dirs.append(app_dir)
self.log("Sanity: Got app_dir {}".format(app_dir))
elif data:
self.log("WARN: appdaemon section is missing from appdaemon.yaml")
passed = False
Expand Down