Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible data path and addon arg fix #161

Merged
merged 3 commits into from
Jan 29, 2024
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
6 changes: 3 additions & 3 deletions src/emhass/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@
# Define the paths
DATA_PATH = os.getenv("DATA_PATH", default="/app/data/")
data_path = Path(DATA_PATH)
if args.addon:
if args.addon==1:

Check warning on line 323 in src/emhass/web_server.py

View check run for this annotation

Codecov / codecov/patch

src/emhass/web_server.py#L323

Added line #L323 was not covered by tests
OPTIONS_PATH = os.getenv('OPTIONS_PATH', default=data_path / "options.json")
options_json = Path(OPTIONS_PATH)
CONFIG_PATH = os.getenv("CONFIG_PATH", default="/usr/src/config_emhass.yaml")
CONFIG_PATH = os.getenv("CONFIG_PATH", default="/app/config_emhass.yaml")

Check warning on line 326 in src/emhass/web_server.py

View check run for this annotation

Codecov / codecov/patch

src/emhass/web_server.py#L326

Added line #L326 was not covered by tests
hass_url = args.url
key = args.key
# Read options info
Expand All @@ -332,7 +332,7 @@
options = json.load(data)
else:
app.logger.error("options.json does not exists")

DATA_PATH = "/share/" #"/data/"
else:
CONFIG_PATH = os.getenv("CONFIG_PATH", default="/app/config_emhass.yaml")
Expand Down
Loading