-
Couldn't load subscription status.
- Fork 106
Add TAG reader #164
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 TAG reader #164
Conversation
Some VTO device like IPC-HDW3441TM-AS have NFC Tag reader. With propose code add therse features
custom_components/dahua/__init__.py
Outdated
| asyncio.run_coroutine_threadsafe( | ||
| async_scan_tag(self.hass, card_id_md5, self.get_device_name()), self.hass.loop | ||
| ).result() | ||
| return |
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.
Are you certain this return needs to be here?
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.
Non necessary for the code execution. "return" avoid the code check again for event_key or listner,
reducing computational cost.
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 am not the owner of the PR, but I confirm that the code works once you remove the unneeded return, as you very well pointed out.
Shall we wait for @ozziii to fix it, or do you want me to do a separate PR?
|
Should we make a new PR for this? Think @ozziii abandoned this PR. Willing to make a new PR myself. |
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.
removed return
|
@rroller could this be merged soon? This feature would be great. |
|
Hmm, there's a merge conflict, this needs to be fixed first, then i'll merge |
|
I created a new PR and merged it in #279 |
|
Released in 0.9.45 - https://github.com/rroller/dahua/releases/tag/0.9.45 |
Some VTO device like VTO2111D-P-S2 have NFC Tag reader.
With propose code add therse features