mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-07 04:21:29 +00:00
🔨 Re-branding of the Supervisor API (#16)
* 🔨 Re-branding of the Supervisor API * 🚑 Fix typo in the supervisor token
This commit is contained in:
parent
5c7f2914cd
commit
a4b2a4cc1a
15 changed files with 196 additions and 196 deletions
10
lib/host.sh
10
lib/host.sh
|
@ -12,7 +12,7 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
function bashio::host.reload() {
|
||||
bashio::log.trace "${FUNCNAME[0]}"
|
||||
bashio::api.hassio POST /host/reload
|
||||
bashio::api.supervisor POST /host/reload
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -20,7 +20,7 @@ function bashio::host.reload() {
|
|||
# ------------------------------------------------------------------------------
|
||||
function bashio::host.shutdown() {
|
||||
bashio::log.trace "${FUNCNAME[0]}"
|
||||
bashio::api.hassio POST /host/shutdown
|
||||
bashio::api.supervisor POST /host/shutdown
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -28,7 +28,7 @@ function bashio::host.shutdown() {
|
|||
# ------------------------------------------------------------------------------
|
||||
function bashio::host.reboot() {
|
||||
bashio::log.trace "${FUNCNAME[0]}"
|
||||
bashio::api.hassio POST /host/reboot
|
||||
bashio::api.supervisor POST /host/reboot
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -54,7 +54,7 @@ function bashio::host() {
|
|||
if bashio::cache.exists 'host.info'; then
|
||||
info=$(bashio::cache.get 'host.info')
|
||||
else
|
||||
info=$(bashio::api.hassio GET /host/info false)
|
||||
info=$(bashio::api.supervisor GET /host/info false)
|
||||
bashio::cache.set 'host.info' "${info}"
|
||||
fi
|
||||
|
||||
|
@ -79,7 +79,7 @@ function bashio::host.hostname() {
|
|||
|
||||
if bashio::var.has_value "${hostname}"; then
|
||||
hostname=$(bashio::var.json hostname "${hostname}")
|
||||
bashio::api.hassio POST /host/options "${hostname}"
|
||||
bashio::api.supervisor POST /host/options "${hostname}"
|
||||
bashio::cache.flush_all
|
||||
else
|
||||
bashio::host 'host.info.hostname' '.hostname'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue