-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve compatibility for non-dry-contact configurations. #265
Conversation
@bdraco Would you mind approving the workflows to run in this PR so I can ensure that the changes work in all of the tests in the CI matrix? Thanks. |
Been about a month ... any updates on this? I believe this would fix an issue I am having with a custom setup without dry-contacts |
I had been waiting for the CI results to ensure that the changes didn't break anything, and now I see they are all green, so I've marked this 'ready for review'. |
This looks ok to me. If I could not be on an airplane for a few days in a row (or the same time zone) I could test this. I only have one of the newer boards for testing and its been 1000s of miles away from where I've been at for the last few weeks |
@kpfleming Would you please resolve conflicts |
* Don't compile any dry-contact code unless PROTOCOL_DRYCONTACT is defined. * Use BinarySensor instead of GPIOBinarySensor to allow the user to use a template binary sensor (or any other type) if they wish.
Done. |
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.
Thanks @kpfleming
Everything appears to work as expected 👍
All boards support dry contacts, the ifdefs are incorrect
Don't compile any dry-contact code unless PROTOCOL_DRYCONTACT is defined.
Use BinarySensor instead of GPIOBinarySensor to allow the user to use a template binary sensor (or any other type) if they wish. This is the recommendation of the ESPHome maintainers, and also aligns the C++ code with the Python configuration code (which will accept any type of binary sensor).
Closes #264.