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:
parent
6694b0470e
commit
00e298206e
52 changed files with 841 additions and 562 deletions
|
@ -4,6 +4,7 @@ import unittest
|
|||
from homeassistant.const import (STATE_ON, STATE_OFF)
|
||||
from homeassistant.components.binary_sensor import command_line
|
||||
from homeassistant import bootstrap
|
||||
from homeassistant.helpers import template
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
@ -56,7 +57,7 @@ class TestCommandSensorBinarySensor(unittest.TestCase):
|
|||
|
||||
entity = command_line.CommandBinarySensor(
|
||||
self.hass, data, 'test', None, '1.0', '0',
|
||||
'{{ value | multiply(0.1) }}')
|
||||
template.Template('{{ value | multiply(0.1) }}', self.hass))
|
||||
|
||||
self.assertEqual(STATE_ON, entity.state)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue