Commit Graph

21 Commits (6ed60d2b328d5b3bc32b9da0d4647341350edbb7)

Author SHA1 Message Date
Ruslan Sayfutdinov 55f4962c06
Fix pylint plugin which checks relative imports (#62693) 2021-12-23 11:14:47 -08:00
Erik Montnemery 5256e26b6a
Fix incorrect docstring in automation trace code (#61168) 2021-12-07 18:05:41 +01:00
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
Marc Mueller 238b488642
Use assignment expressions 03 (#57710) 2021-10-17 20:08:11 +02:00
Marc Mueller 77ee72cbb9
Import Callable from collections.abc (1) (#56775) 2021-09-29 16:32:11 +02:00
Ville Skyttä 59809503d1
Various type hint related improvements (#54971)
* Avoid some implicit generic Anys

* Fix hassio discovery view type hints

* Fix http view result type in assert message
2021-08-21 13:58:49 +02:00
Erik Montnemery 14dd6478d1
Enable basic type checking for trace (#52468) 2021-07-03 17:52:31 +02:00
Ruslan Sayfutdinov 391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
Erik Montnemery 1ea0d8ae02
Correct trace of condition actions (#50800) 2021-05-17 16:54:17 -07:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Erik Montnemery ff5fbea1fb
Improve trace of template conditions (#49101)
* Improve trace of template conditions

* Refactor

* Fix wait_template trace

* Update tests
2021-04-12 20:22:28 +02:00
Erik Montnemery 9f481e1642
Include script script_execution in script and automation traces (#48576) 2021-04-01 09:42:23 -07:00
Erik Montnemery c6a20d0fc1
Improve traces for nested script runs (#48366) 2021-03-26 10:14:01 -07:00
Erik Montnemery 8896ae0d56
Add support for tracing script execution (#48276)
* Add support for tracing script execution

* Tweak
2021-03-24 17:56:22 +01:00
Erik Montnemery 7b717bc437
Correct trace for repeat script actions (#48031) 2021-03-18 13:14:06 -07:00
Marc Mueller 6fb2e63e49
Update typing 02 (#48014) 2021-03-17 18:34:19 +01:00
Erik Montnemery f82e59c32a
Make it possible to list debug traces for a specific automation (#47744) 2021-03-15 16:51:04 -07:00
Erik Montnemery 704000c049
Add support for breakpoints in scripts (#47632) 2021-03-09 21:23:11 -08:00
Erik Montnemery ea4f3e31d5
Include changed variables in automation trace (#47549)
* Include changed variables in automation trace

* Deduplicate some code

* Tweak

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Fix format

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-03-08 22:48:36 +01:00
Erik Montnemery 2f9d03d115
Merge action and condition traces (#47373)
* Merge action and condition traces

* Update __init__.py

* Add typing to AutomationTrace

* Make trace_get prepare a new trace by default

* Correct typing of trace_cv

* Fix tests
2021-03-06 12:57:21 +01:00
Erik Montnemery 17401cbc29
Initial automation tracing (#46755)
* Initial prototype of automation tracing

* Small fixes

* Lint

* Move trace helpers to its own file

* Improve trace for state and numeric_state conditions

* Tweaks + apply suggestions from code review

* Index traces by automation_id, trace while script is running

* Refactor condition tracing

* Improve WS API to get traces for single automation

* Add tests

* Fix imports

* Fix imports

* Address review comments

* Cap logging of loops

* Remove unused ContextVar action_config
2021-03-04 14:16:24 +01:00