Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Crossway

macrumors newbie
Original poster
Jul 7, 2022
5
2
Hello everyone, I've got my iPhone XS battery changed on October 2021 but I've been using it badly (charging to 100% and discharging up to 1%) and so battery health dropped to 88% with only 270 cycles.

Right now I'm trying to charge it everytime is reaches 20% but I would like to turn off my tapo smart plug when the battery reaches 80%.

I've made an automation when the battery is 80% set tapo plug to off but it seems like it does not work, I don't understand if it's the automation not starting because if I create a new shortcut to check the battery level and turn the plug off when battery is >80% it works, so I guess the problem is not the smart plug.

Would you help me to fix this? Thanks :)
 

Attachments

  • photo_2022-07-07_11-10-52.jpg
    photo_2022-07-07_11-10-52.jpg
    33.2 KB · Views: 721

Crossway

macrumors newbie
Original poster
Jul 7, 2022
5
2
Here’s mine for overnight plug-in, set to charge just before I wake.
Well, now it's working, yesterday it wasn't... By the way why set two 4 seconds wait time?

I would also like to do this with my apple watch but I don't know how to get the battery level
 
  • Like
Reactions: reppans

reppans

macrumors 6502
Dec 2, 2006
323
190
Well, now it's working, yesterday it wasn't... By the way why set two 4 seconds wait time?

I would also like to do this with my apple watch but I don't know how to get the battery level

I found my automation only ~50% reliable without wait scripting, I believe it’s due to the wifi connection entering some sort of intermittent ‘sleep’ state when the screen is off/locked. One 4sec wait brought reliability to ~95%, and a longer single 8sec wait didn’t seem to work since my screen seems to time-out ~4sec idle anyways.
 

Crossway

macrumors newbie
Original poster
Jul 7, 2022
5
2
I found my automation only ~50% reliable without wait scripting, I believe it’s due to the wifi connection entering some sort of intermittent ‘sleep’ state when the screen is off/locked. One 4sec wait brought reliability to ~95%, and a longer single 8sec wait didn’t seem to work since my screen seems to time-out ~4sec idle anyways.
Oh ok, I will test with mine, if it's not reliable I'll try to do it your way :)
 

now i see it

macrumors G4
Jan 2, 2002
11,256
24,286
If you really want to pamper the battery, leave it discharged at around 40% SOC overnight, then charge it first thing in the morning. A lithium battery is the least stressed when it’s at about 40% SOC. Most stressed at 100% SOC.
 
  • Like
Reactions: Crossway

Crossway

macrumors newbie
Original poster
Jul 7, 2022
5
2
I'm trying to do the same with my apple watch. The shortcut is just an infinite loop that checks the battery, if it's 80% it powers off the plug and stop this script otherwise it keeps going. If I trigger the shortcut manually it works fine. But when I trigger bed time (by editing the sleep schedule) it does not start
Ok fixed, the problem was the battery app asking to run every single time to sync itself.
But now if the automation triggers (so it goes into the "true" part of the if) after some minutes after it started it gives an error. While if it completes itself in a short time after the automation start there's no problem
 

Attachments

  • WhatsApp Image 2022-07-08 at 10.50.40.jpeg
    WhatsApp Image 2022-07-08 at 10.50.40.jpeg
    76.6 KB · Views: 341
  • WhatsApp Image 2022-07-08 at 10.50.41.jpeg
    WhatsApp Image 2022-07-08 at 10.50.41.jpeg
    141.4 KB · Views: 345
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.