Comments (10)
Yes, I see and can reproduce this issue. Will fix.
Explanation:
Battery reports CURRENT_NOW=1000 (ยตA, =1 mA) despite the battery not being discharged or charged.
Fix in my mind: Assert Full
-status even with consumption() != 0
given *_FULL = *_NOW or STATUS=Full (which doesn't work with some batteries, that's why we figure out the status by the numbers in the first place, however, with this fix it should work for yet another kind of broken battery controllers...)
from i3pystatus.
Ok, many thanks
from i3pystatus.
After updating to the latest version, it works fine. Thanks!
from i3pystatus.
Same Problem here:
$ cat /cats/class/power_supply/BAT0/uevent
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000
POWER_SUPPLY_VOLTAGE_NOW=14413000
POWER_SUPPLY_CHARGE_FULL_DESIGN=5200000
POWER_SUPPLY_CHARGE_FULL=4958000
POWER_SUPPLY_CHARGE_NOW=2653000
POWER_SUPPLY_CAPACITY=53
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=BAT
POWER_SUPPLY_MANUFACTURER=NOTEBOOK
POWER_SUPPLY_SERIAL_NUMBER=0001
status.register("battery",
battery_ident="BAT0",
format="{status} {percentage_design:.1f}%",
alert=True,
alert_percentage=10,
color="#008800",
charging_color="#008800",
full_color="#00ff00",
status={
"DPL": "X",
"DIS": "โ",
"CHR": "โ",
"FULL": "=",
},)
Running the current version.
from i3pystatus.
What's the output of i3pystatus in this case?
from i3pystatus.
It says FULL
from i3pystatus.
Ah, I guess it's because there is no information available about current / power drawn currently. But it should at least get the state right... (since BatteryCharge.consumption() = -1 if no CURRENT_NO is available)
from i3pystatus.
It doesn't matter if i have one percent ore 90 percent. It always says FULL
from i3pystatus.
This should fix it. Before there was some miscommunication between the layers by using "-1" as a "nope, don't have that" value.
from i3pystatus.
Looks good!
from i3pystatus.
Related Issues (20)
- battery module can't read /sys/class/power_supply/BAT0/uevent
- Support for pipewire
- handle over width
- fontawesome icons are not rendered correctly in status bar HOT 1
- Feelslike not working
- i3pystatus shows json output in statusbar
- Lots of "invalid option" when running under python3.10 HOT 3
- format_up doesn't recognise {network_graph_recv} in network module. HOT 2
- Weather Underground has deprecated API v2 HOT 2
- module mouse hover events
- scroll the entire line
- Persistent `shell` commands that print a new content as a new line on standard output. HOT 6
- I provide this library with my blender add-on and when I enable my add-on I get this error HOT 5
- Registering a module within a Group: AttributeError: 'Group' object has no attribute 'default_hints' HOT 1
- WUnderground weather module returns 401 Unauthorized
- solaar: upstream change - removal of device ID numbers
- item overflowing gets whole bar colored HOT 2
- Empty color string floods ~/.xsession-errors HOT 3
- Add Python3.12 support HOT 1
- Python 3.12 Removed the imp package which __init__.py includes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3pystatus.