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

Expanded battery sensor detection #1837

Merged
merged 1 commit into from
Sep 26, 2020
Merged

Expanded battery sensor detection #1837

merged 1 commit into from
Sep 26, 2020

Conversation

aristocratos
Copy link
Contributor

This expands the battery sensors detection for directories not starting with "BAT" but containing "battery" in the name. (As example on a Pinebook Pro running the default Manjaro distro the folder will be named "cw2015-battery").

It also looks for "/time_to_empty_now" (minutes) which can be used to get "secsleft" if either "energy_now" or "power_now" fails to get a value.

The TestSensorsBattery tests will however fail on a machine that has the "/time_to_empty_now" file present since it won't return "None" in that case. I figured I probably shouldn't mess with the tests and let you do it if this PR gets accepted.

@giampaolo giampaolo merged commit 549200d into giampaolo:master Sep 26, 2020
@giampaolo
Copy link
Owner

Thank you.

giampaolo added a commit that referenced this pull request Sep 26, 2020
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.

None yet

2 participants