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

Battery State Unknown when battery is not charging but plugged into AC power. #99

Open
trollLemon opened this issue Aug 1, 2023 · 0 comments · May be fixed by #100
Open

Battery State Unknown when battery is not charging but plugged into AC power. #99

trollLemon opened this issue Aug 1, 2023 · 0 comments · May be fixed by #100

Comments

@trollLemon
Copy link

Before I begin, I want to thank the maintainers of this crate, as it helped a lot in my Screen Brightness daemon, where I needed battery info.

On Linux laptops, software like TLP (https://linrunner.de/tlp/) can configure the battery to stop charging at a certain threshold while plugged in. I used TLP on my ArchLinux laptop and noticed that battery.state() will return "unknown" as a state when the battery is on AC power but was not charging.

I looked at my battery's status file and found that when the battery is on AC power but not charging, the status file will read "Not Charging."

I can work on a PR that adds support for the "Not charging" state. I would need to add a new value to the State enum and add formatting for the new state.

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.

1 participant