Move DATA_LOGGING constant to homeassistant.const (#111763)

This commit is contained in:
J. Nick Koston 2024-02-28 14:09:51 -10:00 committed by GitHub
parent 3c8fcaf912
commit 5bf7a00989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

@ -24,6 +24,7 @@ from . import config as conf_util, config_entries, core, loader, requirements
from .components import http from .components import http
from .const import ( from .const import (
FORMAT_DATETIME, FORMAT_DATETIME,
KEY_DATA_LOGGING as DATA_LOGGING,
REQUIRED_NEXT_PYTHON_HA_RELEASE, REQUIRED_NEXT_PYTHON_HA_RELEASE,
REQUIRED_NEXT_PYTHON_VER, REQUIRED_NEXT_PYTHON_VER,
SIGNAL_BOOTSTRAP_INTEGRATIONS, SIGNAL_BOOTSTRAP_INTEGRATIONS,
@ -65,7 +66,6 @@ _LOGGER = logging.getLogger(__name__)
ERROR_LOG_FILENAME = "home-assistant.log" ERROR_LOG_FILENAME = "home-assistant.log"
# hass.data key for logging information. # hass.data key for logging information.
DATA_LOGGING = "logging"
DATA_REGISTRIES_LOADED = "bootstrap_registries_loaded" DATA_REGISTRIES_LOADED = "bootstrap_registries_loaded"
LOG_SLOW_STARTUP_INTERVAL = 60 LOG_SLOW_STARTUP_INTERVAL = 60

View File

@ -12,7 +12,6 @@ import voluptuous as vol
from homeassistant.auth.models import User from homeassistant.auth.models import User
from homeassistant.auth.permissions.const import POLICY_READ from homeassistant.auth.permissions.const import POLICY_READ
from homeassistant.bootstrap import DATA_LOGGING
from homeassistant.components.http import ( from homeassistant.components.http import (
KEY_HASS, KEY_HASS,
KEY_HASS_USER, KEY_HASS_USER,
@ -23,6 +22,7 @@ from homeassistant.const import (
CONTENT_TYPE_JSON, CONTENT_TYPE_JSON,
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
EVENT_STATE_CHANGED, EVENT_STATE_CHANGED,
KEY_DATA_LOGGING as DATA_LOGGING,
MATCH_ALL, MATCH_ALL,
URL_API, URL_API,
URL_API_COMPONENTS, URL_API_COMPONENTS,

View File

@ -1602,6 +1602,11 @@ HASSIO_USER_NAME = "Supervisor"
SIGNAL_BOOTSTRAP_INTEGRATIONS = "bootstrap_integrations" SIGNAL_BOOTSTRAP_INTEGRATIONS = "bootstrap_integrations"
# hass.data key for logging information.
KEY_DATA_LOGGING = "logging"
# Date/Time formats # Date/Time formats
FORMAT_DATE: Final = "%Y-%m-%d" FORMAT_DATE: Final = "%Y-%m-%d"
FORMAT_TIME: Final = "%H:%M:%S" FORMAT_TIME: Final = "%H:%M:%S"