Laptop sensor package for Debian Bullseye

Is there some kind of configuration setup or set of scripts available for installation?

Or is this something that has to be home built?

Reason I ask is that I want to automate the power to the charger when the laptop is on my home network and hopefully increase the battery’s lifetime.

Assign a IP to the laptop and ping it every now and then.

Not sure how this will increase the lifetime of the battery or charger though.
Possibly the charger.

Perhaps a better explanation is needed.

Goal 1 @10% battery charge turn on via smart switch the power to the laptop charger.

Goal 2 @99% battery charge turn off power to laptop charger.

That way the battery is cycled as it should be to last the longest. I know modern laptops do this to some extent but as long as that charger is plugged in it is drawing power. I would rather not power it when it is not needed.

What I need is to make some kind of sensor that runs on the laptop and tells home assistant what the current charge is just like my phones and tablets. What searching I have done has not revealed any such package/app or script.

Not if it’s a modern laptop/battery.
Linus tech tips had a video about it some time ago.

Short explanation from what I remember. Keep the battery within 40-60% all the time.
I could be wrong on the percentage but it was something like that.

For windows there is this:


I have not tested it myself.

I am wondering it the code from the android app could be used somehow.

At what percentage the power is cycled is not really all that criticacle. I still want to shut off the power to the charger when it is not in use. Why waste electric? I have to pay for that.

It sounds like you will just replace one “waste” of electricity with another.
I mean the smart plug will use electricity when it’s “off”.
Does the charger really use enough to make you save anything considering the purchase of the smart plug and that it’s always on?
I honestly believe we are talking about years before you get a return.

If you really want to stop waste then unplug the charger or put a foot operated manual switch on it and you can control it manually fairly easy.