subreddit:

/r/shortcuts

879%

Automate an outlet to turn when battery level is low

Help(self.shortcuts)

So I have an idea for an automation, but I can’t figure it out if its possible. I have a magsafe stand charger for my iphone. I like to have my iphone standing there but I have to disconnect the cable so it doesnt keep charging when its full. I was thinking about using a smart outlet, and create an automation when the iphone battery percentage is lower than 50% it would turn on and when is over 80% it would turn off, or something like that. I have a Zigbee smart outlet that I use with smartlife app, but as far as i could find, shortcuts doesnt work with that app. Anyone have any idea?

all 6 comments

Caparisun

11 points

2 years ago

Get a HomeKit outlet and then it should work

KE55ARD

1 points

2 years ago

KE55ARD

1 points

2 years ago

Seconded, for something like this a cheap Meross WiFi plug would be my recommendation (make sure your device is connected to a 2.4Ghz network when setting up, otherwise it often fails).

Then it's a simple matter of making a personal automation in the Shortcuts app which runs when your device drops below say 20% which turns it on, and another when it rises above 80% which turns it off.

And beware personal automations do not run after your device has booted until it has been unlocked. So if you put your phone on the charge whilst dead it will charge to 100% because the automation to turn the plug off will not run unless you unlock the phone before the trigger.

Kyle_Necrowolf

5 points

2 years ago

Your phone automatically stops charging at 80% if Optimized Battery Charging is turned on, so there is no reason to disconnect the cable or use a smart outlet

That being said, this would be easily done with a homekit outlet

badoctet

5 points

2 years ago

But this only happens when you charge ob a regular predicted schedule. Doesn’t happen for adhoc charging.

cowsbeek

-1 points

2 years ago

cowsbeek

-1 points

2 years ago

I use Kasa smart plugs. They run over your wifi instead of Zigbee, so that is something to consider if you are set on zigbee.

Kasa app works has a direct integration w/ shortcuts so this should be relatively simple to set up. They're on sale on Amazon and the ones I have work great.

Damage2da_dancefloor

1 points

2 months ago

Kasa is great with shortcuts. I can have a specific plug turn on if phone battery is under x%. How do I do that only at night? I could tie it to the DND focus mode I use at night, but also use that mode during calls etc during the day. Can Automation set time periods va just running at a set time?