With this shortcut it is possible to put the Apple TV into sleep mode with an assigned time in minutes.
What's New
Version 1.1
Update Link
What it does
11 actions-
Ask for InputOk, wie lange soll der Timer laufen?
-
Set VariableSleepTimer
-
Date
-
Adjust Date
-
Set Focus
-
Text
-
Copy to Clipboard
-
Get Clipboard
-
If
-
Sleep Apple T Vcom.apple.TVRemoteUIService
-
CommentVersion 1.1 alxblog.de @alxblog
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/sharing'
#include 'actions/calendar'
#define color darkgray
#define glyph circledPower
prompt("Ok, wie lange soll der Timer laufen?", "Number")
@SleepTimer
currentDate()
const Sleeptimer = adjustDate(, "")
setFocusMode(, "Time", Sleeptimer)
const Text = "+ Sleeptimer Aktiv"
setClipboard(Text)
const Zwischenablage = getClipboard()
if Zwischenablage == "Sleeptimer Aktiv" {
rawAction("com.apple.TVRemoteUIService.SleepAppleTVIntent", {})
}
/*
Version 1.1
alxblog.de
@alxblog
*/
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
You Might Also Like
Advertisement