-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Ignore secrets yaml on command line #2715
Ignore secrets yaml on command line #2715
Conversation
When connecting to an AP, it is sometimes necessary to know the local MAC of the ESP device to add it to the network. This info is now printed in the log.
Formatting the MAC manually is not as pretty...
Add local MAC address to WiFi info
When ``esphome`` is run from the CLI to update a subset of the configuration files, or all of them, the ``secrets.yaml`` file - when specified - yields an error. This makes it hard to do, for instance, ``esphome upload *yaml``. This makes sure to skip the files ``secrets.yaml`` and ``secrets.yml`` when specified on the command line.
Found by pylint during CI run.
Secrets files names should be specified outside of config key names.
The secrets files were skipped at the wrong time of processing. Move the check down a bit. Also provide a better warning when skipping a secrets file.
@jesserockz I think this is a good idea for usability, but it's technically a breaking change as you can no longer have a config named |
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.
That's fine. I would not expect people to have that anyway.
Thank you for your contribution! |
This has been an itch to scratch, but you're welcome! My second addition to esphome, both personal itches, but probably useful in the wild! |
What does this implement/fix?
When
esphome
is run from the CLI to update a subset of the configuration files, or all of them, thesecrets.yaml
file - when specified - yields an error. This makes it hard to do, for instance,esphome upload *yaml
. This code makes sure to skip the filessecrets.yaml
andsecrets.yml
when specified on the command line.Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Example entry for
config.yaml
:# Example config.yaml
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: