diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index c3da28752d7..0c51c6d2e08 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -24,6 +24,7 @@ from . import config as conf_util, config_entries, core, loader, requirements from .components import http from .const import ( FORMAT_DATETIME, + KEY_DATA_LOGGING as DATA_LOGGING, REQUIRED_NEXT_PYTHON_HA_RELEASE, REQUIRED_NEXT_PYTHON_VER, SIGNAL_BOOTSTRAP_INTEGRATIONS, @@ -65,7 +66,6 @@ _LOGGER = logging.getLogger(__name__) ERROR_LOG_FILENAME = "home-assistant.log" # hass.data key for logging information. -DATA_LOGGING = "logging" DATA_REGISTRIES_LOADED = "bootstrap_registries_loaded" LOG_SLOW_STARTUP_INTERVAL = 60 diff --git a/homeassistant/components/api/__init__.py b/homeassistant/components/api/__init__.py index ad162d143dd..01a84cf606a 100644 --- a/homeassistant/components/api/__init__.py +++ b/homeassistant/components/api/__init__.py @@ -12,7 +12,6 @@ import voluptuous as vol from homeassistant.auth.models import User from homeassistant.auth.permissions.const import POLICY_READ -from homeassistant.bootstrap import DATA_LOGGING from homeassistant.components.http import ( KEY_HASS, KEY_HASS_USER, @@ -23,6 +22,7 @@ from homeassistant.const import ( CONTENT_TYPE_JSON, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED, + KEY_DATA_LOGGING as DATA_LOGGING, MATCH_ALL, URL_API, URL_API_COMPONENTS, diff --git a/homeassistant/const.py b/homeassistant/const.py index ed9c280d39d..31b08becee6 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1602,6 +1602,11 @@ HASSIO_USER_NAME = "Supervisor" SIGNAL_BOOTSTRAP_INTEGRATIONS = "bootstrap_integrations" + +# hass.data key for logging information. +KEY_DATA_LOGGING = "logging" + + # Date/Time formats FORMAT_DATE: Final = "%Y-%m-%d" FORMAT_TIME: Final = "%H:%M:%S"