diff --git a/lib/cli.sh b/lib/cli.sh index 9a51d58..010a368 100644 --- a/lib/cli.sh +++ b/lib/cli.sh @@ -85,19 +85,8 @@ function bashio::cli.version_latest() { # Checks if there is an update available for the CLI. # ------------------------------------------------------------------------------ function bashio::cli.update_available() { - local version - local version_latest - - bashio::log.trace "${FUNCNAME[0]}" - - version=$(bashio::cli.version) - version_latest=$(bashio::cli.version_latest) - - if [[ "${version}" = "${version_latest}" ]]; then - return "${__BASHIO_EXIT_NOK}" - fi - - return "${__BASHIO_EXIT_OK}" + bashio::log.trace "${FUNCNAME[0]}" "$@" + bashio::cli 'cli.info.update_available' '.update_available // false' } # ------------------------------------------------------------------------------ diff --git a/lib/core.sh b/lib/core.sh index 3ab36b6..a882e3d 100644 --- a/lib/core.sh +++ b/lib/core.sh @@ -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' } # ------------------------------------------------------------------------------