1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-11 14:29:58 +00:00
Commit Graph

312 Commits

Author SHA1 Message Date
Franck Nijhof
67b200a532 Add if/else automation/script action ()
Co-authored-by: Erik <erik@montnemery.com>
2022-04-12 15:02:17 +02:00
Franck Nijhof
81d90b1bc7 Add stop/error script/automation action () 2022-04-11 14:22:22 -07:00
Franck Nijhof
7087020283 Allow any entity to match state condition () 2022-04-11 10:53:42 -07:00
Paulus Schoutsen
ad1e43e083 Add support for variables on trigger () 2022-03-18 09:25:22 +01:00
Marc Mueller
eae0c75620 Make TypeVars private (2) () 2022-03-17 19:09:55 +01:00
Richard T. Schaefer
15580281a3 Allow area, device, and entity selectors to optionally support multiple selections like target selector ()
* Allow area, device, and entity selectors to optionally support multiple selections like target selector

* Update according to code review comments

* Adjust tests

* Update according to review comments

* Tweak error message for multiple entities

Co-authored-by: Erik <erik@montnemery.com>
2022-03-03 10:35:06 +01:00
Paulus Schoutsen
756e711850 Add a new validate config WS command () 2022-02-22 22:28:37 +01:00
Erik Montnemery
ec67dcb620 Add support for validating and serializing selectors ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-18 14:24:08 -08:00
Marc Mueller
bfb1abd3a2 Add type ignore error codes [helpers] () 2022-02-18 11:31:37 +01:00
Bram Kragten
ef34f070ee Allow metadata in service call data ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2022-02-16 21:13:36 +01:00
Marc Mueller
d3b7bd25ef Update typing (1) () 2022-01-11 21:26:03 +01:00
Erik Montnemery
fc2025509e Teach call service script action about entity registry ids () 2022-01-07 08:42:47 -08:00
Marc Mueller
fcd80b2ed7 Fix ensure_list typing () 2022-01-04 15:23:48 +01:00
Tobias Sauerwein
2c904c0974 Bump mypy to 0.930 ()
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Ruslan Sayfutdinov
55f4962c06 Fix pylint plugin which checks relative imports () 2021-12-23 11:14:47 -08:00
Erik Montnemery
e48f567176 Wrap shorthand template conditions during schema validation () 2021-12-21 17:20:15 +01:00
Erik Montnemery
e2fca2e305 Support shorthand templates in condition actions ()
* Support shorthand templates in condition actions

* Fix validation message

* Fix tests
2021-12-21 12:19:31 +01:00
Erik Montnemery
0e3bc21d54 Teach state and numeric_state conditions about entity registry ids () 2021-12-02 14:55:12 -08:00
Erik Montnemery
c85bb27d0d Teach state trigger about entity registry ids ()
* Teach state trigger about entity registry ids

* Tweak

* Add tests

* Tweak tests

* Fix tests

* Resolve entity ids during config validation

* Update device_triggers

* Fix mistake

* Tweak trigger validator to ensure we don't modify the original config

* Add index from entry id to entry

* Update scaffold

* Pre-compile UUID regex

* Address review comment

* Tweak mock_registry

* Tweak

* Apply suggestion from code review
2021-12-02 14:26:45 +01:00
Erik Montnemery
a62bc6b3b9 Minor tweak of cv.deprecated + cv.removed ()
* Minor tweak of cv.deprecated + cv.removed

* Satisfy pylint
2021-11-04 19:12:21 +01:00
Jan Bouwhuis
c3fc19915e Mqtt fan fail deprecated options for classic speeds ()
* Fail deprecated options

* new removed validator

* correct module_name - add tests

* Add test cant find module cv.removed

* module name from stack+1

* Remove error from log. Just throw.

* assert on thrown exception text

* cleanup formatting remove KeyStyleAdapter

* format the replacement_key and update test

* deprecated vs removed - add raise_if_present opt

* doc string update

* is deprecated
2021-11-04 17:54:27 +01:00
Robert Hillis
16371e6579 Add missing ZMW currency () 2021-11-02 20:21:56 -07:00
Paulus Schoutsen
5deeeed672 Add some more required/optional tags to condition schemas () 2021-10-26 17:25:15 +02:00
Chris Browet
e961d92b5e Allow service data template to return a dict () 2021-10-23 21:10:30 +02:00
Marc Mueller
77ee72cbb9 Import Callable from collections.abc (1) () 2021-09-29 16:32:11 +02:00
Børge Nordli
0d654fa6b3 Extract attribute names out of vol.Optional when validating entity service schema () 2021-08-25 13:00:11 +02:00
Franck Nijhof
243c52e210 Add missing BYN currency () 2021-08-21 19:14:48 -07:00
Paulus Schoutsen
952d11cb03 Ensure internal/external URL have no path ()
* Ensure internal/external URL have no path

* Fix comment typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +02:00
Franck Nijhof
1968b95829 Add currency core configuration ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Erik Montnemery
b01b33c304 Add trigger condition ()
* Add trigger condition

* Tweaks, add tests
2021-06-11 15:05:57 +02:00
Erik Montnemery
49bec86dae Add base schema for triggers ()
* Add base schema for triggers

* Tweak

* Make TRIGGER_BASE_SCHEMA a voluptuous schema

* Make state trigger BASE_SCHEMA a voluptuous schema
2021-06-11 09:51:12 +02:00
Franck Nijhof
f35929ba63 Allow referencing sensor entities for before/after in time conditions ()
* 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
05241a7a68 Allow number/sensor entities in numeric state conditions/triggers () 2021-06-04 18:14:48 +02:00
Paulus Schoutsen
45e1473f83 Improve config validation for key_value_schemas () 2021-06-01 11:23:59 +02:00
Franck Nijhof
378cee01b4 Add typing to async_register_entity_service () 2021-05-03 14:22:38 +02:00
Marc Mueller
f1d48ddfe3 Update pylint to 2.8.0 () 2021-04-24 14:39:24 -10:00
Marc Mueller
c07646db5d Update typing syntax ()
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Ville Skyttä
970cbcbe15 Type hint improvements () 2021-04-17 08:35:21 +02:00
Erik Montnemery
d1df6e6fba Don't get code_context when calling inspect.stack ()
* Don't get code_context when calling inspect.stack

* Update homeassistant/helpers/config_validation.py
2021-04-09 07:26:09 +02:00
Franck Nijhof
4e3c12883e Allow templatable service target to support scripts () 2021-04-01 13:10:01 -07:00
Marc Mueller
6fb2e63e49 Update typing 02 () 2021-03-17 18:34:19 +01:00
Alan Tse
f86e7535e0 Add location details to deprecation warning () 2021-03-16 21:16:07 +01:00
Franck Nijhof
42fd3be0e8 Add template support to service targets ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-23 22:46:00 -08:00
Erik Montnemery
2d70806035 Add support for "alias" in script steps device, device_condition, and conditions ()
Co-authored-by: Donnie <donniekarnsinsb@hotmail.com>
2021-02-20 19:21:09 -08:00
tkdrob
c2302784c2 Use core constants for helpers () 2021-02-08 22:53:17 +01:00
Erik Montnemery
047f16772f Support templating MQTT triggers ()
* 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
Philip Allgaier
84f506efb7 Set default position value for cover action ()
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-29 21:11:12 +01:00
Joakim Sørensen
b1c2cde40b Changes to filename and path validation ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Alexei Chetroi
de8f273bd0 Allow input_number entity_id as for numeric_state trigger thresholds ()
* Allow input_number as limits for numeric_state trigger

* Rename threshold schema
2021-01-13 16:20:59 +01:00
Ville Skyttä
3a88a4120e Helpers type hint improvements () 2021-01-09 00:08:34 +01:00