i want it to stop charging when the device reaches 80% battery life.
ive been using ifttt to charge when it drops below 20 (works) and tasker for over 80 (this was also unsuccessful) but i’ll move that automation over to HA once i can get this one to work
For now let’s try two different automation and then combine later once it is working the way you want.
For the ‘off’ automation remove everything from the ‘from’ and put ‘80’ in the ‘to’. You could put 80 in either the to or from if you want but not both, the difference would be it stops charging at either 79 to 80 transition or the transition of 80 to 81, your choice.
Look at dev tools and verify you want the data from the unit_of_measurement attribute, my guess is that you don’t.
Be aware this automation will not work if the computer is powered off.