Skip to content

Instantly share code, notes, and snippets.

@and7ey
Created May 16, 2024 14:14
Show Gist options
  • Save and7ey/e1b140e77062e3e69e6217c7551bf17f to your computer and use it in GitHub Desktop.
Save and7ey/e1b140e77062e3e69e6217c7551bf17f to your computer and use it in GitHub Desktop.
// https://developers.home-assistant.io/docs/api/rest
// http://www.sublimetext.com/docs/3/build_systems.html
{
"keyfiles": ["manifest.json"],
"quiet": true,
"syntax": "Packages/ShellScript/Bash.sublime-syntax",
"variants":
[
{
"name": "Restart Server",
"shell_cmd": "curl -X POST -H \"Authorization: Bearer <YOUR-TOKEN>\" -H \"Content-Type: application/json\" http://192.168.1.111:8123/api/services/homeassistant/restart"
},
{
"name": "Get logs",
"shell_cmd": "curl -H \"Authorization: Bearer <YOUR-TOKEN>\" -H \"Content-Type: application/json\" http://192.168.1.111:8123/api/error_log"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment