Replace update available logic with property access (#43)

This commit is contained in:
Franck Nijhof 2021-01-14 03:15:55 +01:00 committed by GitHub
parent 1662ddf17f
commit 4fc9a14155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 28 deletions

View file

@ -122,22 +122,11 @@ function bashio::core.version_latest() {
}
# ------------------------------------------------------------------------------
# Checks if there is an update available for the Supervisor.
# Checks if there is an update available for Home Assistant.
# ------------------------------------------------------------------------------
function bashio::supervisor.update_available() {
local version
local version_latest
bashio::log.trace "${FUNCNAME[0]}"
version=$(bashio::core.version)
version_latest=$(bashio::core.version_latest)
if [[ "${version}" = "${version_latest}" ]]; then
return "${__BASHIO_EXIT_NOK}"
fi
return "${__BASHIO_EXIT_OK}"
function bashio::core.update_available() {
bashio::log.trace "${FUNCNAME[0]}" "$@"
bashio::cli 'core.info.update_available' '.update_available // false'
}
# ------------------------------------------------------------------------------