-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
"""Shared constants for script and automation tracing and debugging.""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from homeassistant.util.hass_dict import HassKey | ||
|
||
if TYPE_CHECKING: | ||
from homeassistant.helpers.storage import Store | ||
|
||
from . import TraceData | ||
|
||
|
||
CONF_STORED_TRACES = "stored_traces" | ||
DATA_TRACE = "trace" | ||
DATA_TRACE_STORE = "trace_store" | ||
DATA_TRACES_RESTORED = "trace_traces_restored" | ||
DATA_TRACE: HassKey[TraceData] = HassKey("trace") | ||
DATA_TRACE_STORE: HassKey[Store[dict[str, list]]] = HassKey("trace_store") | ||
DATA_TRACES_RESTORED: HassKey[bool] = HassKey("trace_traces_restored") | ||
DEFAULT_STORED_TRACES = 5 # Stored traces per script or automation |