-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 platform dependencies #6623
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #6623 +/- ##
==========================================
- Coverage 53.70% 53.44% -0.27%
==========================================
Files 50 50
Lines 9408 9554 +146
Branches 1654 1687 +33
==========================================
+ Hits 5053 5106 +53
- Misses 4056 4135 +79
- Partials 299 313 +14 ☔ View full report in Codecov by Sentry. |
Nice idea @kbx81, is there a reason why you choose "esphome.ota" and not "ota.esphome"? To me the last version makes more sense to me. But maybe you have something else in mind that makes it easier to extend this later on? |
It was sort of arbitrary -- but it seems we use this arrangement for the logger tags, so I just copied that. It's trivial to change, so if we agree we should swap platform.component for component.platform, I've got no issues with that. 😄 |
I have switched it to use |
dc188d7
to
80e85ee
Compare
What does this implement/fix?
Small PR that enables the ability to specify platform dependencies. For example:
...would require the platform
esphome
be present within theota
component configuration:This enables more user-friendly validation errors should a required platform not be present.
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: