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
Raman Gupta
bef8be9256
Support dynamic schema validation in device conditions and actions ( #52007 )
...
* Allow integrations to provide dynamic schema validation in device conditions and actions
* Add tests
* re-add type
* mypy
2021-06-28 09:23:46 +02:00
Erik Montnemery
b01b33c304
Add trigger condition ( #51710 )
...
* Add trigger condition
* Tweaks, add tests
2021-06-11 15:05:57 +02:00
Franck Nijhof
f35929ba63
Allow referencing sensor entities for before/after in time conditions ( #51444 )
...
* Allow referencing sensor entities for before/after in time conditions
* Fix typo in variable naming
* Improve test coverage
2021-06-07 14:50:31 +02:00
Franck Nijhof
c5dc99c052
Fix time condition microsecond offset when using input helpers ( #51337 )
2021-06-01 17:57:23 +02:00
Erik Montnemery
63e16de6c0
Improve time condition trace ( #51335 )
2021-06-01 17:07:45 +02:00
Erik Montnemery
1ea0d8ae02
Correct trace of condition actions ( #50800 )
2021-05-17 16:54:17 -07:00
J. Nick Koston
3fa8ffa731
Enable mccabe complexity checks in flake8 ( #49616 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Erik Montnemery
d28b959a09
Improve sun condition trace ( #49551 )
2021-04-22 16:46:27 -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
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
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
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
Franck Nijhof
7a8b7224c8
Don't raise on known non-matching states in numeric state condition ( #47378 )
2021-03-04 13:09:08 -08: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
Anders Melchiorsen
d61d39de08
Handle ConditionError with multiple entity_id for state/numeric_state ( #46855 )
2021-02-22 08:11:59 +01: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
Anders Melchiorsen
e7e3e09063
Raise ConditionError for zone errors ( #46253 )
...
* Raise ConditionError for zone errors
* Do not test missing state
* Handle multiple entities/zones
2021-02-19 13:14:47 +01:00
Anders Melchiorsen
888c9e120d
Raise ConditionError for time errors ( #46250 )
2021-02-11 17:29:17 +01:00
Anders Melchiorsen
1f5fb8f28a
Raise ConditionError for template errors ( #46245 )
2021-02-11 10:30:09 +01:00
Anders Melchiorsen
f27066e773
Raise ConditionError for state errors ( #46244 )
2021-02-09 09:46:36 +01:00
Anders Melchiorsen
b9b1caf4d7
Raise ConditionError for numeric_state errors ( #45923 )
2021-02-08 10:47:57 +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
Franck Nijhof
45aba9bdf2
Allow skip parsing template result ( #42401 )
2020-10-26 16:01:09 +01:00
Franck Nijhof
ee914366a8
Add native Python types support to templates ( #41227 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
Paulus Schoutsen
fe2c16dc29
Allow any value when triggering on state attribute ( #41261 )
2020-10-05 12:53:12 +02:00
Franck Nijhof
cd26384634
Fix entity extraction from Template conditions ( #40034 )
2020-09-13 22:05:45 +02:00
Franck Nijhof
1ec3446c56
State condition can also accept an input_* Entity ID as state value ( #39691 )
2020-09-07 00:36:01 +02:00
Franck Nijhof
878347243d
Numeric state condition can also accept input_number entity ID ( #39680 )
2020-09-06 20:04:07 +02:00
Franck Nijhof
a3c45a6f89
Add shorthand notation for Template conditions ( #39705 )
2020-09-06 16:55:06 +02:00
Franck Nijhof
da9b077c11
Time condition can also accept an input_datetime Entity ID ( #39676 )
2020-09-06 16:06:09 +02:00
Franck Nijhof
bdc5af8dd2
Add support for attributes in (numeric) state conditions ( #39050 )
2020-08-19 20:01:27 +02:00
Franck Nijhof
02f174e2e6
Add support for multiple states/zones in conditions ( #36835 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-16 00:53:13 +02:00
Franck Nijhof
ba73ac12ba
Add support for multiple entity_ids in conditions ( #36817 )
2020-06-15 22:54:19 +02:00
Franck Nijhof
928d9ec117
Fix not condition validation and entity/device extraction ( #34959 )
2020-05-01 00:15:53 +02:00
Franck Nijhof
c93c6a66e8
Add NOT condition helper ( #34624 )
2020-04-24 09:40:23 -07:00
Ville Skyttä
267d98b5eb
Type hint improvements ( #33082 )
2020-04-17 11:33:58 -07:00
Paulus Schoutsen
424e15c7a7
Find related items scripts/automations ( #31293 )
...
* Find related items scripts/automations
* Update manifest
2020-01-29 16:19:13 -08:00
Paulus Schoutsen
0fba9e44ed
Migrate zone to use collection helpers ( #30774 )
2020-01-22 12:36:25 -08:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Erik Montnemery
c43eeee62f
Improve validation of device condition config ( #27131 )
...
* Improve validation of device condition config
* Fix typing
2019-10-02 15:58:14 -07:00
Paulus Schoutsen
6fdff9ffab
Reorg device automation ( #26880 )
...
* async_trigger -> async_attach_trigger
* Reorg device automations
* Update docstrings
* Fix types
* Fix extending schemas
2019-09-24 14:57:05 -07:00
Erik Montnemery
f7dc537275
Add device automation condition ( #26313 )
...
* Add support for device conditions
* Lint
* Update test case
* Make and+or conditions async, adjust tests
* Cleanup tests
* Remove non callback versions of conditions, correct typing
* Correct typing
* Update light/strings.json
* Address review comments
* Make device automation lists simple lists, not dicts
* Add device_automation/const.py
* Use IS_ON/IS_OFF everywhere for conditions
2019-09-05 16:49:32 +02:00
Erik Montnemery
fad54cd6d8
Ensure sun conditions are using the right date ( #23664 )
...
* Ensure sun conditions are using the right date
2019-08-16 17:34:56 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Ville Skyttä
58bb6f2e99
Add type hints to helpers.condition ( #20266 )
2019-01-21 00:03:12 +01:00