@paulo-vasco, I downloaded this BatteryInfoView tool and ran it on my laptop with this command:

d:\tools\BatteryInfoView.exe /scomma d:\tools\battery.csv

This is the output I got:

C:\Users\Russ>type d:\tools\battery.csv Description,Value Battery Name,8850 Manufacture Name, Hewlett-Packard Serial Number,Li4402A Manufacture Date, Power State,Discharging Current Capacity (in %),89.0% Current Capacity Value,"76,730 mWh" Full Charged Capacity,"86,213 mWh" Designed Capacity,"98,235 mWh" Battery Health,87.8% Voltage,"11,630 millivolts " Charge/Discharge Rate ,"-37,551 milliwatts " Chemistry ,Lithium Ion Low Battery Capacity (1),"6,038 mWh" Low Battery Capacity (2),"3,074 mWh" Critical Bias, Number of charge/discharge cycles,0 Battery Temperature, Remaining battery time for the current activity (Estimated), Full battery time for the current activity (Estimated), Remaining time for charging the battery (Estimated), Total time for charging the battery (Estimated),

You could write a script that loops once per minute and reads the Current Capacity (in 😵 value from that output.

The script could run one command that turns on your smart switch when the battery gets low, and another command that turns the smart switch back off when the battery is full.

Those two commands could be tcmd commands like this:

d:\tools\tcmd.exe -t calculator -c russhp

Instead of calculator you could make it something like switchon and switchoff, then use this method to run an Alexa routine that flips your switch on and off when you run those commands.