Scanne avec ton iPhone pour installer
This shortcut is a way to connect to the Govee 🏠 app with a Govee API key (this lets you play around more without making a lot of tap-to-runs 😥). Just enter a list with the command to run, and it will run (install shortcuts below as well).😁👍
Here is an example: example 💡
Nouveautés
Version 1.2
Updater was failing
Ce qu’il fait
27 actions-
CommentThis is your API key - don't share it!
-
Text
-
Get Item from List
-
If
-
CommentExample list command: "list" Govee API Connect Show Result
-
Get Contents of URLhttps://openapi.api.govee.com/router/api/v1/user/devices
-
Set Variableresponse
-
If
-
CommentExample set command: "E07564" hex to dec ["set", "H6004", "1A:2B:3C:4D:5E:6F:7G:8H", "devices.capabilities.color_setting", "colorRgb", {hex to dec result}] Govee API Connect Show Result
-
If
-
Get Item from List
-
Get Item from List
-
Get Item from List
-
Get Item from List
-
Get Item from List
-
Run ShortcutUUID Creator
-
Get Contents of URLhttps://openapi.api.govee.com/router/api/v1/device/control
-
Set Variableresponse
-
If
-
CommentExample get command: ["get", "H6004", "1A:2B:3C:4D:5E:6F:7G:8H"] Govee API Connect Show Result
-
If
-
Run ShortcutUUID Creator
-
Get Item from List
-
Get Item from List
-
Get Contents of URLhttps://openapi.api.govee.com/router/api/v1/device/state
-
Set Variableresponse
-
Stop and Output
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/web'
#define color blue
#define glyph house
// This is your API key - don't share it!
const GoveeAPIKey = ""
const SI1 = getRandomItem(ShortcutInput)
if SI1 == "list" {
/*
Example list command:
"list"
Govee API Connect
Show Result
*/
fileRequest("https://openapi.api.govee.com/router/api/v1/user/devices", "GET", Dictionary, {
"Govee-API-Key": "{GoveeAPIKey}"
})
@response
} else {
/*
Example set command:
"E07564"
hex to dec
["set",
"H6004",
"1A:2B:3C:4D:5E:6F:7G:8H",
"devices.capabilities.color_setting",
"colorRgb",
{hex to dec result}]
Govee API Connect
Show Result
*/
if SI1 == "set" {
const SI2 = getListItems(ShortcutInput, 2, 6)
const SI3 = getListItems(ShortcutInput, 2, 6)
const SI4 = getListItems(ShortcutInput, 2, 6)
const SI5 = getListItems(ShortcutInput, 2, 6)
const SI6 = getListItems(ShortcutInput, 2, 6)
const UUID = run()
fileRequest("https://openapi.api.govee.com/router/api/v1/device/control", "POST", Dictionary, {
"Govee-API-Key": "{GoveeAPIKey}"
})
@response
} else {
/*
Example get command:
["get",
"H6004",
"1A:2B:3C:4D:5E:6F:7G:8H"]
Govee API Connect
Show Result
*/
if SI1 == "get" {
const UUID1 = run()
const SI7 = getListItems(ShortcutInput, 2, 6)
const SI8 = getListItems(ShortcutInput, 2, 6)
fileRequest("https://openapi.api.govee.com/router/api/v1/device/state", "POST", Dictionary, {
"Govee-API-Key": "{GoveeAPIKey}"
})
@response
}
}
}
mustOutput(@response, @response)
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Ça pourrait aussi te plaire
Publicité