Not the solution you're asking for but I've used the ACC magisk module to do this on devices for years. If you're willing to install magisk and then ignore it this is a very mature solution.
Otherwise, like others have said, run home assistant on your network somewhere and have tasker call to HA to switch the charger plug off when you hit your target charge level. That should be pretty straightforward.
If anyone's interested in helping break twatter's stranglehold on brief discussion content encourage your organization (school, company, nonprofit, lab or other org) to host their own Mastodon instance in addition to email. This is how we get people on federated platforms and off of Musk's nazi-friendly platform, by making it easy to use and ubiquitous.
+1, I have our thermostat kick down an extra degree at night to tell our bodies that it's sleeping o'clock. It makes. A huge difference in the quality of sleep I get.
A warm shower or bath followed by cooling tricks your body into going into its sleep cycle and producing melatonin.
So don't buy one? You don't need a new phone every 1-2y unless you're a spectacularly well trained consumer.
I usually replace my phone every 3-4y when power efficiency and performance have significantly improved, or there's a new radio standard that I need (5G, AX WiFi) or the camera makes me want an upgrade. If none of those things are true then use your phone until it dies 🤷♂️
I mean, global warming us slowly into extinction is a pretty AI way to go about it