-
-
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
mpr121: Add GPIO support #6776
mpr121: Add GPIO support #6776
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6776 +/- ##
==========================================
+ Coverage 53.70% 54.09% +0.38%
==========================================
Files 50 50
Lines 9408 9627 +219
Branches 1654 1701 +47
==========================================
+ Hits 5053 5208 +155
- Misses 4056 4093 +37
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
Alright! This is ready for a review :) |
Add validation to exclude using conflicting channels
@polyfloyd I took it upon myself to use this platform as a testbed to do some crazy validation =) Now you cannot use the wrong channel as a pin while there is a higher binary sensor channel being used. I cannot test it on device, but compilation tests are working locally. Let me know how it goes =) Jesse |
Nope! It panics:
The pin conflict validation at compile time is really nice though :) |
Also, the |
Fixed it :P Both touch and GPIO seems to be working well! |
Ah woops, Yeah I guess I forgot that part. Although the set_parent function is already provided by the Parented class |
For component platforms yes, for gpio pins its just the name of the component without |
Ah! Good to know |
I have updated the corresponding documentation |
Thanks! |
What does this implement/fix?
The MPR121 touch controller also supports alternate modes of operation as GPIO controller on the upper 8 of its 12 input channels.
This patch makes it possible to configure such channels as GPIO.
Types of changes
Related issue or feature (if applicable): fixes esphome/feature-requests/issues/1838
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3845
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: