-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work if data_dir is not set, right ?
Then, data_dir have to be required in the new version!
4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically yes, but it is always set
toogoodtogo-ha-mqtt-bridge/toogoodtogo_ha_mqtt_bridge/settings.json
Line 5 in 4de7bae
Thas one/the reasing the settings go to a
settings.local.json
.4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my config it is not set, as this setting is not found in the readme.
4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in your
settings.local.json
? or which settings file do you mean?The user is not meant to mess with the
settings.json
file. Just with somesettings.local.json
.4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in the repo readme, there is data_dir marked as optinonal
4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not be written clearly, but it is definitely there.
Even if you don't set it explicitly, it is there.
Have a look at
toogoodtogo-ha-mqtt-bridge/toogoodtogo_ha_mqtt_bridge/main.py
Line 191 in 48729eb
where you can see it has already been used for a while.
I use dynaconf to store settings and its layered workflow reads
settings.json
first, and then yoursettings.local.json
is merged on top of it. So if you do not provide adata_dir
at yoursettings.local.json
the one fromsettings.json
is used.In fact, you can optionally provide a
data_dir
, which then will replace the one defined insettings.json
. Either viasettings.local.json
, or e.g. environment variableDYNACONF_DATA_DIR
.4de7bae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh now you got me. Thanks for this explanation!
I thought this will only load settings.local.json but forgot there is also an settings.json.