1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
ha-core/homeassistant/components/trace/const.py
Erik Montnemery 961ee717ef
Store automation and script traces (#56894)
* Store automation and script traces

* Pylint

* Deduplicate code

* Fix issues when no stored traces are available

* Store serialized data for restored traces

* Update WS API

* Update test

* Restore context

* Improve tests

* Add new test files

* Rename restore_traces to async_restore_traces

* Refactor trace.websocket_api

* Defer loading stored traces

* Lint

* Revert refactoring which is no longer needed

* Correct order when restoring traces

* Apply suggestion from code review

* Improve test coverage

* Apply suggestions from code review
2021-10-19 10:23:23 +02:00

8 lines
279 B
Python

"""Shared constants for script and automation tracing and debugging."""
CONF_STORED_TRACES = "stored_traces"
DATA_TRACE = "trace"
DATA_TRACE_STORE = "trace_store"
DATA_TRACES_RESTORED = "trace_traces_restored"
DEFAULT_STORED_TRACES = 5 # Stored traces per script or automation