Optimize template 2 (#3521)

* Enforce compiling templates

* Refactor templates

* Add template validator to Logbook service

* Some more fixes

* Lint

* Allow easy skipping of rfxtrx tests

* Fix template bug in AND & OR conditions

* add entities extractor

Conflicts:
	tests/helpers/test_template.py

* fix unittest

* Convert template to be async

* Fix Farcy

* Lint fix

* Limit template updates to related entities

* Make template automation async
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2016-09-27 21:29:55 -07:00
1 parent 6694b0470e
commit 00e298206e
52 files changed
+841 -562

No files matched your search

+5 -5
View File
@@ -2,7 +2,7 @@
# pylint: disable=too-many-public-methods,protected-access
import unittest
from homeassistant.bootstrap import _setup_component
from homeassistant.bootstrap import setup_component
from homeassistant.components import script
from tests.common import get_test_home_assistant
@@ -41,7 +41,7 @@ class TestScriptComponent(unittest.TestCase):
}
},
):
assert not _setup_component(self.hass, 'script', {
assert not setup_component(self.hass, 'script', {
'script': value
}), 'Script loaded with wrong config {}'.format(value)
@@ -58,7 +58,7 @@ class TestScriptComponent(unittest.TestCase):
self.hass.bus.listen(event, record_event)
assert _setup_component(self.hass, 'script', {
assert setup_component(self.hass, 'script', {
'script': {
'test': {
'sequence': [{
@@ -93,7 +93,7 @@ class TestScriptComponent(unittest.TestCase):
self.hass.bus.listen(event, record_event)
assert _setup_component(self.hass, 'script', {
assert setup_component(self.hass, 'script', {
'script': {
'test': {
'sequence': [{
@@ -127,7 +127,7 @@ class TestScriptComponent(unittest.TestCase):
self.hass.services.register('test', 'script', record_call)
assert _setup_component(self.hass, 'script', {
assert setup_component(self.hass, 'script', {
'script': {
'test': {
'sequence': {