-
Notifications
You must be signed in to change notification settings - Fork 738
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
Linear battery voltage #208
Conversation
@Adminiuga wanna give this a peek when you have a moment? LMK if you think the strategy is good and if so i'll merge it in. Thanks. |
zhaquirks/__init__.py
Outdated
log_msg = ( | ||
f"{self.endpoint.device.manufacturer} {self.endpoint.device.model}, " | ||
f"Voltage [RAW]:{raw_value} [Max]:{self.MAX_VOLTS} " | ||
f"[Min]:{self.MIN_VOLTS}, Battery Percent: {percent/2}" |
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.
we shouldn't use F-Strings for logging, ie no need to format something that might not see the light of the day at all.
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.
@roblandry wanna change this so it can be merged?
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.
Done
other than debug log formatting looks good to me. |
Initial implementation of linear battery voltages.
Fixes: #199
Potential fix: #176
Reported values: