Skip to content

No such device error #33

Description

@coderGtm

When I run the battery.GetAll() function, it gives me the following error:

panic: [{ChargeRate:read /sys/class/power_supply/BAT1/power_now: no such device}]

While I was tinkering, I found out that the ls command did show a file named power_now but opening it with cat gives the same error as above. On the other hand, I found out that there is another file called capacity which gives the battery level.

I am on Arch Linux and using go 1.21.6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions