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

How to get the current characteristic value inside the on_write callback? #77

Closed
ChocolateLoverRaj opened this issue Jan 29, 2024 · 1 comment · Fixed by #81
Closed

Comments

@ChocolateLoverRaj
Copy link
Contributor

I have a characteristic and I want to run some code on on_write only if the new value is different than the current value. However, I can't access the current value inside the on_write callback. Is there a better solution than storing another copy of the value outside the characteristic?

@taks
Copy link
Owner

taks commented Jan 29, 2024

I have added current_data to OnWriteArgs.
Please check.

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 a pull request may close this issue.

2 participants