Giter Site home page Giter Site logo

Comments (10)

enkore avatar enkore commented on August 20, 2024

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.

skety avatar skety commented on August 20, 2024

Ok, many thanks

from i3pystatus.

skety avatar skety commented on August 20, 2024

After updating to the latest version, it works fine. Thanks!

from i3pystatus.

s-hell avatar s-hell commented on August 20, 2024

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.

enkore avatar enkore commented on August 20, 2024

What's the output of i3pystatus in this case?

from i3pystatus.

s-hell avatar s-hell commented on August 20, 2024

It says FULL

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

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.

s-hell avatar s-hell commented on August 20, 2024

It doesn't matter if i have one percent ore 90 percent. It always says FULL

from i3pystatus.

enkore avatar enkore commented on August 20, 2024

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.

s-hell avatar s-hell commented on August 20, 2024

Looks good!

from i3pystatus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.