Skip to content
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

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

kpfleming
Copy link
Contributor

@kpfleming kpfleming commented Apr 27, 2024

  • 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.

@kpfleming
Copy link
Contributor Author

@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.

@Awesome-Stuff-Is-Awesome

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

@bdraco bdraco closed this Jun 12, 2024
@bdraco bdraco reopened this Jun 12, 2024
@kpfleming kpfleming marked this pull request as ready for review June 13, 2024 10:18
@kpfleming
Copy link
Contributor Author

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'.

@bdraco
Copy link
Member

bdraco commented Jun 25, 2024

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

@bdraco
Copy link
Member

bdraco commented Jul 3, 2024

@kpfleming Would you please resolve conflicts

@kpfleming kpfleming marked this pull request as draft July 3, 2024 10:49
* 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.
@kpfleming kpfleming marked this pull request as ready for review July 3, 2024 11:02
@kpfleming
Copy link
Contributor Author

Done.

Copy link
Member

@bdraco bdraco left a 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 👍

@bdraco bdraco merged commit 9df4ceb into ratgdo:main Jul 3, 2024
16 checks passed
bdraco added a commit that referenced this pull request Jul 3, 2024
All boards support dry contacts, the ifdefs are incorrect
bdraco added a commit that referenced this pull request Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation fails with custom config that doesn't include dry-contact sensors
3 participants