-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow relocation of secret.yaml #4697
Comments
I just thought I should open a bug ticket because the information on how to specify the path to the "secret.yaml" file is missing in the documentation. As it specifically says "e.g secret.yaml" - "e.g." (!) on https://www.zigbee2mqtt.io/information/configuration.html I assumed that just like "devices.json" I could just specify the path to the file and the info on where to specify the name it is just missing here. Also, I find it misleading to put both "mqtt" and "advanced" options into a file named "secret.yaml". |
@sshaikh I've added de data/*.yaml to the ignore files. Instead of |
@Koenkk So I assume that the "e.g." on https://www.zigbee2mqtt.io/information/configuration.html is wrong? ;) |
@tricoos what "e.g." do you mean (there are many of them on this page) |
@Koenkk I quoted above "e.g secret.yaml". That confused me because I searched for a config param to specify the path. |
@tricoos can you make a proposal on how to refactor this? Note that |
@Koenkk Do you mean a logical proposal or a code proposal? I could only do the first. |
@tricoos a logical proposal (what you want to put in |
I've moved to using ZIGBEE2MQTT_DATA which fixes the issue as described if you'd like to close it. I would suggest that CONFIG and DATA are different things though, as I'd like to source control config but not necessarily things like the database. But for now I can git ignore the files I feel are superfluous. |
@Koenkk Here is my proposal. I don't like if there is a single file that picks several attributes from various consistent blocks (like There is a new Sample
secret.yaml
homeassistant.yaml
This allows you to even group related configuration values that reside in different parts of the config (like with Notes:
Actually, as I have just split my Zigbee network into two I would now be able to use the same |
@tricoos thanks, I like the proposal a lot, since this is not very easy to implement (because Zigbee2MQTT will e.g. add devices to Since the OP problem has been solved I will close this one. |
I'm sorry for commenting on an old + closed issue, but I wanted to +1 the comment made by @sshaikh:
I'm deploying zigbee2mqtt on Nixos, and would like to have the configuration live (symlinked from the nix store) in |
It would be ideal to be able to pass the root config file via env var or argument, independently from the working directory/include resolution directory. |
Is your feature request related to a problem? Please describe
Although it's appreciated that secrets are no longer held in configuration (#2201) the secret.yaml file can only be found in data/. This is a tiny bit irritating as data/ is part of Z2M's git tree and so secret.yml will always appear as an untracked file there - this is also especially inconsistent if you've relocated configuration.yaml using the ZIGBEE2MQTT_CONFIG environment variable.
Describe the solution you'd like
To be able to relocate secret.yml, either via a similar environment variable (ZIGBEE2MQTT_SECRETS_DIR?) or by automatically looking in the same directory as configuration.yaml.
Describe alternatives you've considered
I could add data/secret.yaml to the ignore file and commit that, but then I'll always be one commit ahead of upstream master.
The text was updated successfully, but these errors were encountered: