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
Add on_tag_removed trigger to pn532 #1436
Conversation
Hey there @OttoWinter, @jesserockz, mind taking a look at this pull request as its been labeled with an integration ( |
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.
I like it all apart from the naming of on_released
maybe on_tag_removed
or something...
I was considering adding this at some point. Thanks
c9b041e
to
962f2cc
Compare
Ok, the reasoning was to keep it similar to the binary_sensor, but I agree it's easier to understand like that |
Thanks, Just needs a docs PR then can be merged in. |
You need to edit the description to include the docs PR. |
dc014fc
to
a8645fc
Compare
a8645fc
to
745fc5b
Compare
Changed the description, rebased and tested. |
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.
This will not exactly work as it cannot read_tag_
when there is no tag present at the time.
While it wont crash, there will be errors in the log when it tries to authenticate with the tag.
It will return a blank tag
with the uid: new nfc::NfcTag(uid, nfc::MIFARE_CLASSIC)
Thanks @jesserockz for finishing the work. |
Description:
Add
on_releaseon_tag_removed trigger to pn532 to get a notification when tag is removed.Related issue (if applicable): closes esphome/feature-requests#172
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#915
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: