From 93e00b593ecc67977940a676d524319d7003994a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 22 Oct 2023 17:07:55 +0200 Subject: [PATCH] Add method to request the state of Core (#142) --- lib/info.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/info.sh b/lib/info.sh index 864e531..b8a7e4c 100644 --- a/lib/info.sh +++ b/lib/info.sh @@ -148,3 +148,11 @@ function bashio::info.operating_system() { bashio::log.trace "${FUNCNAME[0]}" bashio::info 'supervisor.info.operating_system' '.operating_system' } + +# ------------------------------------------------------------------------------ +# Returns the current state of Home Assistant Core +# ------------------------------------------------------------------------------ +function bashio::info.state() { + bashio::log.trace "${FUNCNAME[0]}" + bashio::info 'supervisor.info.running' '.state' +}