Erik Montnemery
4a814405c2
Minor deduplication of condition validation code ( #61170 )
2021-12-07 11:55:16 -08:00
Erik Montnemery
caf5ee2fab
Remove optional validation when creating conditions ( #60481 )
2021-11-28 14:54:07 +01:00
GitHub Action
f0c9f443d1
[ci skip] Translation update
2021-11-15 00:12:46 +00:00
Marc Mueller
84618fa831
Use assignment expressions 30 ( #58714 )
2021-10-30 16:33:42 +02:00
Marc Mueller
7063c05127
Use assignment expressions 33 ( #58717 )
2021-10-30 16:32:41 +02:00
GitHub Action
4634b65924
[ci skip] Translation update
2021-10-21 00:12:43 +00: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
2b72b7b7b9
Use assignment expressions 09 ( #57790 )
2021-10-17 20:19:56 +02:00
GitHub Action
f42c2f5170
[ci skip] Translation update
2021-10-02 12:59:05 +00:00
Ville Skyttä
b10fc89a6b
Automation trigger info type hint improvements ( #55402 )
...
* Make automation trigger info a TypedDict
* zwave_js trigger type hint fixes
* Remove redundant automation trigger info field presence checks
* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Paulus Schoutsen
8377b557da
Packages to support config platforms ( #54085 )
2021-08-05 13:11:01 -07:00
Richard T. Schaefer
9e219d9b6e
Add this variable for use by automation and script templates ( #52774 )
2021-07-28 09:09:13 +02:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes ( #52987 )
2021-07-19 10:46:09 +02:00
Robert Hillis
55b0d562ce
Use entity class attributes for automation ( #52694 )
...
* Use entity class attributes for automation
* tweak
2021-07-13 15:01:43 +02:00
GitHub Action
0c5ce9cac2
[ci skip] Translation update
2021-07-07 00:11:57 +00:00
Erik Montnemery
4c9f12b9c5
Correct trace path for trigger with custom id ( #51847 )
2021-06-14 17:09:20 +02:00
Erik Montnemery
7b5e63132c
Prevent parallel reload of automations ( #50008 )
2021-05-25 08:50:50 -07:00
tkdrob
028a07d86f
Wrap up selectors ( #50794 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 14:45:17 +02:00
Shay Levy
cf228e3fe5
Add constructor return type in integrations A-D ( #50903 )
2021-05-20 18:51:39 +03:00
GitHub Action
1f80defe3a
[ci skip] Translation update
2021-05-18 00:12:13 +00:00
Franck Nijhof
eccefd154a
Extend targets for entity component services ( #50760 )
2021-05-17 14:06:50 +02:00
Erik Montnemery
ce64690817
Make number of stored traces configurable ( #49728 )
2021-04-27 10:27:12 -07:00
Ruslan Sayfutdinov
37466ae423
Don't ignore mypy errors by default ( #49270 )
2021-04-26 14:23:21 +02: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
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest ( #46935 )
2021-04-15 10:21:38 +02:00
Erik Montnemery
76d0f93ec1
Include blueprint input in automation trace ( #48575 )
2021-04-01 13:34:47 -07:00
Erik Montnemery
9f481e1642
Include script script_execution in script and automation traces ( #48576 )
2021-04-01 09:42:23 -07:00
Erik Montnemery
b26779a27a
Add id to automation triggers ( #48464 )
2021-03-31 14:56:04 +02:00
Philip Allgaier
450f3740cd
Use consolidated constant for "description" ( #48490 )
2021-03-31 14:12:15 +02:00
Bram Kragten
d1a1e70726
Search for areas used in automations and scripts ( #48499 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-30 15:01:56 -07:00
Marc Mueller
2956eb0902
Update pylint to 2.7.3 ( #48488 )
...
* Update pylint to 2.7.3
* Add class-const-naming-style
* Remove unused-import message
* Additional cleanup
2021-03-29 18:02:56 -10:00
Franck Nijhof
855b68faa1
Remove HomeAssistantType alias from entity components - Part 1 ( #48467 )
2021-03-29 13:24:36 -10:00
Erik Montnemery
7534b54e4e
Merge condition and action traces ( #48461 )
2021-03-29 14:06:49 -07:00
Erik Montnemery
14ef0531f0
Address review comments from trace refactoring PRs ( #48288 )
2021-03-29 08:09:14 +02: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
9f8b697e64
Refactor tracing: Prepare for tracing of scripts ( #48231 )
2021-03-23 14:53:38 -07:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible ( #48189 )
2021-03-23 14:36:43 +01:00
Erik Montnemery
a49989241a
Refactor tracing: Move trace support to its own integration ( #48224 )
2021-03-22 19:19:38 +01:00
Paulus Schoutsen
f67e8b4369
Populate trigger variable when manually triggering automation ( #48202 )
...
* Populate trigger variable when manually triggering automation
* Update tests/components/automation/test_init.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-03-22 08:22:32 +01:00
Erik Montnemery
346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes ( #48161 )
...
* Mark base state_attributes @final, rename others to extra_state_attributes
* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
Marc Mueller
76199c0eb2
Update typing 04 ( #48037 )
2021-03-17 23:34:25 +01:00
Paulus Schoutsen
f1c274b3dd
Add run_id to automation logbook event ( #47980 )
2021-03-16 14:37:26 -07:00
Klaas Schoute
0097169dd3
Add aliases to actions in automation blueprints ( #47940 )
2021-03-16 17:14:07 +01:00
Erik Montnemery
9647eeb2e0
Add custom JSONEncoder for automation traces ( #47942 )
...
* Add custom JSONEncoder for automation traces
* Add tests
* Update default case to include type
* Tweak
* Refactor
* Tweak
* Lint
* Update websocket_api.py
2021-03-16 14:21:05 +01:00
HomeAssistant Azure
c11b85af2f
[ci skip] Translation update
2021-03-16 00:04:36 +00:00
Erik Montnemery
f82e59c32a
Make it possible to list debug traces for a specific automation ( #47744 )
2021-03-15 16:51:04 -07:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify ( #47528 )
2021-03-15 15:11:41 +01:00
Paulus Schoutsen
2a22c54fcb
Store the correct context in the trace ( #47785 )
2021-03-12 08:12:26 +01:00
Erik Montnemery
6c084ae6ce
Update integrations a-e to override extra_state_attributes() ( #47756 )
2021-03-11 16:51:03 +01:00
Erik Montnemery
a9a9e1f199
Tweak automation tracing ( #47721 )
2021-03-10 14:42:13 -08:00
Paulus Schoutsen
a50e9812cb
Fix automations with traces. ( #47705 )
2021-03-09 22:40:17 -08:00
Erik Montnemery
704000c049
Add support for breakpoints in scripts ( #47632 )
2021-03-09 21:23:11 -08:00
Erik Montnemery
fd1add8f15
Rename AutomationTrace.runid to AutomationTrace.run_id ( #47669 )
2021-03-09 15:49:41 +01:00
Erik Montnemery
a243adc551
Add WS command to get a summary of automation traces ( #47557 )
...
* Add WS command to get a summary of automation traces
* Update tests
* Correct rebase mistake, update tests
2021-03-08 20:30:52 +01:00
Erik Montnemery
8fe51b8ea7
Store automation traces indexed by run_id ( #47509 )
...
* Store traces indexed by run_id
* Format
* Add test
* Add test
* Clarify comment
2021-03-08 18:04:41 +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
tkdrob
3baeed3684
Clean up constants ( #47323 )
2021-03-05 19:08:04 +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
Ville Skyttä
dc880118a4
Lint suppression cleanups ( #47248 )
...
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Franck Nijhof
ea4bbd771f
Add service names to previously enriched services ( #46929 )
...
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-02-23 14:10:13 +01:00
Philip Allgaier
8ac9faef3b
Description tweaks for automation services ( #46926 )
2021-02-22 21:36:38 +01:00
Anders Melchiorsen
b1a24c8bbb
Log the name of automations with condition errors ( #46854 )
2021-02-21 19:34:45 -10:00
Anders Melchiorsen
d33a1a5ff8
Refine printing of ConditionError ( #46838 )
...
* Refine printing of ConditionError
* Improve coverage
* name -> type
2021-02-21 14:54:36 +01:00
Anders Melchiorsen
bfea7d0baa
Raise ConditionError for and/or/not errors ( #46767 )
2021-02-19 13:15:30 +01:00
Franck Nijhof
bc1cb8f0a0
Add selectors to Automation service definitions ( #46629 )
2021-02-18 12:25:25 +01:00
Erik Montnemery
047f16772f
Support templating MQTT triggers ( #45614 )
...
* Add support for limited templates (no HASS access)
* Pass variables to automation triggers
* Support templates in MQTT triggers
* Spelling
* Handle trigger referenced by variables
* Raise on unsupported function in limited templates
* Validate MQTT trigger schema in MQTT device trigger
* Add trigger_variables to automation config schema
* Don't print stacktrace when setting up trigger throws
* Make pylint happy
* Add trigger_variables to variables
* Add debug prints, document limited template
* Add tests
* Validate MQTT trigger topic early when possible
* Improve valid_subscribe_topic_template
2021-02-08 10:50:38 +01:00
Anders Melchiorsen
b9b1caf4d7
Raise ConditionError for numeric_state errors ( #45923 )
2021-02-08 10:47:57 +01:00
tkdrob
bcefbe2dca
Use core constants for automation ( #46016 )
2021-02-04 21:41:43 -05:00
Marc Mueller
7673f57248
Add additional error handling for automation script run ( #45613 )
2021-01-28 09:26:41 +01:00
J. Nick Koston
a7741be9bb
Wait for all triggers when one fails to attach ( #45361 )
2021-01-20 22:13:21 +01:00
Paulus Schoutsen
594e905742
Remove invalidation_version from deprecated ( #44156 )
...
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases
* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Paulus Schoutsen
262e77d969
Blueprint: descriptions + descriptive errors ( #43899 )
2020-12-03 16:44:18 +01:00
Paulus Schoutsen
ff4897a09e
Fix using execute on the notify_leaving_zone ( #43858 )
2020-12-02 16:21:00 +01:00
Paulus Schoutsen
6c9c280bbb
Migrate notify-leaving-zone to use mobile app device action ( #43832 )
2020-12-02 13:07:04 +01:00
Paulus Schoutsen
648f9e100d
Use light turn on service ( #43847 )
2020-12-02 10:53:26 +01:00
Bram Kragten
d93687b5ac
Update area and target selectors add sequence selector ( #43831 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-12-02 09:30:49 +01:00
Paulus Schoutsen
1c9c99571e
Use !input instead of !placeholder ( #43820 )
...
* Use !input instead of !placeholder
* Update input name
* Lint
* Move tests around
2020-12-01 18:21:36 +01:00
Paulus Schoutsen
e406a47293
Allow configuring the delay in the motion light blueprint ( #43737 )
2020-11-28 23:56:15 +01:00
Paulus Schoutsen
dd513147a5
Add a service target ( #43725 )
2020-11-28 23:33:32 +01:00
Paulus Schoutsen
b3be708db6
Add default config if not there ( #43321 )
...
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-11-25 15:10:04 +01:00
Paulus Schoutsen
dc5f7aedd7
Verify that we register blueprints on automation setup ( #43434 )
2020-11-20 15:57:57 +01:00
Paulus Schoutsen
df25b53bb8
Fix automation in packages ( #43202 )
2020-11-13 22:49:01 +01:00
Franck Nijhof
6f326a7ea4
Add support for multiple event triggers in automation ( #43097 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-12 11:58:28 +01:00
HomeAssistant Azure
4b9ba79584
[ci skip] Translation update
2020-11-11 00:10:27 +00:00
Paulus Schoutsen
0fb587727c
Add initial blueprint support ( #42469 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-02 15:00:13 +01:00
HomeAssistant Azure
b102ad731f
[ci skip] Translation update
2020-10-22 00:09:52 +00:00
HomeAssistant Azure
994ae09f69
[ci skip] Translation update
2020-10-15 00:03:50 +00:00
HomeAssistant Azure
6ae12c3faf
[ci skip] Translation update
2020-10-10 00:05:05 +00:00
Paulus Schoutsen
8ae3f575dd
Add extended validation for script repeat/choose ( #41265 )
2020-10-05 14:03:48 +02:00
Paulus Schoutsen
5117a16841
Extract variable rendering ( #39934 )
2020-09-11 12:24:16 +02:00
Paulus Schoutsen
aa9dff572e
Add default variables to script helper ( #39895 )
2020-09-10 20:41:42 +02:00
Phil Bruckner
4486251382
Add max_exceeded log level option to automations & scripts ( #39448 )
2020-09-02 11:05:14 +02:00
HomeAssistant Azure
5ce62c8446
[ci skip] Translation update
2020-09-02 00:03:29 +00:00
J. Nick Koston
dda4cf4d58
Tune logbook performance to accomodate recent changes ( #39348 )
2020-08-30 09:20:31 +02:00
Phil Bruckner
b315df2118
Reduce automation state changes by using script helper's last_triggered attribute ( #39323 )
2020-08-28 14:51:15 -05:00
Phil Bruckner
e6141ae558
Add description of what caused an automation trigger to fire ( #39251 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-28 17:02:12 +02:00
Paulus Schoutsen
2a1fe9d29a
Add websocket trigger/condition commands ( #39109 )
2020-08-24 23:01:57 +02:00
Phil Bruckner
76ead858cf
Add wait_for_trigger script action ( #38075 )
...
* Add wait_for_trigger script action
* Add tests
* Change script integration to use config validator
2020-08-21 11:38:25 +02:00
Phil Bruckner
ca9dd0c833
Reorganize trigger code ( #38655 )
2020-08-17 11:54:56 -05:00
Phil Bruckner
580e229cf2
Create variable with result of wait_template and accept template for timeout option ( #38634 )
2020-08-12 13:42:06 -05:00