ShareShortcuts
Bifurcar “Govee API Connect”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que waffle-hacker reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
21K
Guardado
1
Acciones
27
Categoría
API
Versión
1.2
Idioma
EN

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 💡

hex dec converter

UUID creator

Novedades

Versión 1.2

Updater was failing

Historial de versiones
1.2 15 de sep. de 2024

Updater was failing

1.1 15 de sep. de 2024

get was broken, plus added updater

1.0 14 de sep. de 2024

First release

Qué hace

27 acciones
  1. Comment
    This is your API key - don't share it!
  2. Text
  3. Get Item from List
  4. If
  5. Comment
    Example list command: "list" Govee API Connect Show Result
  6. Get Contents of URL
    https://openapi.api.govee.com/router/api/v1/user/devices
  7. Set Variable
    response
  8. If
  9. Comment
    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
  10. If
  11. Get Item from List
  12. Get Item from List
  13. Get Item from List
  14. Get Item from List
  15. Get Item from List
  16. Run Shortcut
    UUID Creator
  17. Get Contents of URL
    https://openapi.api.govee.com/router/api/v1/device/control
  18. Set Variable
    response
  19. If
  20. Comment
    Example get command: ["get", "H6004", "1A:2B:3C:4D:5E:6F:7G:8H"] Govee API Connect Show Result
  21. If
  22. Run Shortcut
    UUID Creator
  23. Get Item from List
  24. Get Item from List
  25. Get Contents of URL
    https://openapi.api.govee.com/router/api/v1/device/state
  26. Set Variable
    response
  27. Stop and Output

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#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)
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

También te puede gustar

Ver todo
Publicidad