ShareShortcuts

BattSave

Reduce power usage when battery is low

blackhatteam
Fork “BattSave”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so blackhatteam gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
36K
Saved
0
Actions
21
Category
API
Version
1.1
Language
EN

Reduce power usage when battery is low.

Do you need a way to conserve power when your phone battery gets to a level of 20 percent or below?

Do you need a partial charge and not a full charge of your battery?

BattSave may be the tool you need.

When you run the shortcut and your battery level is below 20 percent, it will run a couple of battery saving actions.

When you run the shortcut and your battery is above or has charged up to 50 percent, you get a prompt that you are good to go.

What's New

Version 1.1

Fix for iOS 16.3

Version History
1.1 Jan 24, 2023

Fix for iOS 16.3

1.0 Jan 20, 2023

First release

What it does

21 actions
  1. Get File
  2. If
  3. Create Folder
  4. Show Alert
  5. Open URLs
  6. Wait
  7. Text
  8. Close Tab
    com.apple.mobilesafari
  9. Show Alert
  10. Get Battery Level
  11. Set Variable
    Battery Level
  12. Calculate
  13. If
  14. Set Low Power Mode
  15. Set Brightness
  16. Show Notification
    Enabled!
  17. If
  18. If
  19. Set Low Power Mode
  20. Set Brightness
  21. Show Notification
    Good to go!

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define mac false
#include 'actions/web'
#include 'actions/documents'
#define color green
#define glyph battery

const File = getFileFromFolder(, "BattSave", false)

if !File {
	createFolder("BattSave")
	confirm("Run Initial Setup? ")
	openURL("http://www.blackhatteams.com/p/battsave.html")
	wait(4)
	const Text = "BattSave"
	rawAction("com.apple.mobilesafari.CloseTab", {
		"AppIntentDescriptor": "",
		"target": "Text"
	})
	confirm("Setup Complete! Run Shortcut? ")
}
getBatteryLevel()
@BatteryLevel
const CalculationResult = @BatteryLevel + 1

if CalculationResult < 20 {
	setLowPowerMode(false)
	setBrightness(0.2480315)
	showNotification("Enabled! ")
} else {
	if CalculationResult > 49 {
		setLowPowerMode(0)
		setBrightness(nil)
		showNotification("Good to go! ")
	}
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by blackhatteam

See All

You Might Also Like

See All
Advertisement