1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Wait_template - support for 'trigger.entity_id' and data_template values (#9807)

* *Added support for use of 'trigger.entity_id' and service->data_template->script in wait_template

* * Fixed style violations

* * Fixed regular expression (_RE_GET_POSSIBLE_ENTITIES)

* * combined 'extract_entities' and 'extract_entities_with_variables'
* fixed regular expression

* * Added first test for extract_entities_with_variables

* * Added Unittests (tests/helpers/test_template.py test_extract_entities_with_variables)

* * Added Unittests (tests/helpers/test_script.py test_wait_template_variables)

* * Added Unittests (tests/components/automation/test_template.py test_wait_template_with_trigger)

* * Added Unittests (tests/components/automation/test_state.py test_wait_template_with_trigger)

* * Added Unittests (tests/components/automation/test_numeric_state.py test_wait_template_with_trigger)

* * Fixed style violations

* * Fixed style violations

* * Fixed style violations

* * Fixed style violations

* * Fixed style violations

* * Fixed style violations

* * Updated regular expression and delete whitespaces
This commit is contained in:
cdce8p
2017-10-12 16:57:18 +02:00
committed by Pascal Vizeli
parent c33b179fb8
commit be5c0b2d92
8 changed files with 192 additions and 10 deletions

View File

@@ -108,7 +108,8 @@ def async_track_template(hass, template, action, variables=None):
already_triggered = False
return async_track_state_change(
hass, template.extract_entities(), template_condition_listener)
hass, template.extract_entities(variables),
template_condition_listener)
track_template = threaded_listener_factory(async_track_template)