@SAMUEL-KRAMER-SCHWIDERKE, are you asking if this works?
When I answered @JAIME-FLORES before, I hadn't actually tried it. Just now I tried that script and it didn't work for me. So I'm sorry about that.
I like @JAIME-FLORES's idea - to save electricity by leaving his laptop disconnected from power until the battery gets low.
I found another way to detect your battery laptop's battery charge. You could use Nirsoft's batteryinfoview tool to read your battery's remaining life with a command like this:
batteryinfoview /scomma c:\stuff\battery.txtThen when the battery gets low you could call an IFTTT webhook event that turns your wemo plug on.