Added possibilities to use template in the command_line sensor (#8505)
* Added possibilities to use template in the command_line sensor * Minor style guideline conforms * Minor style guideline conforms * Added new test for template rendering * Minor style guideline conforms * Minor style guideline conforms * Fixed failing testcases * Fix style violations * fix code pretty
This commit is contained in:
1 parent
c0663bf722
commit
d7e8616651
4 files changed
+59
-12
No files matched your search
@@ -54,7 +54,7 @@ class TestCommandSensorBinarySensor(unittest.TestCase):
|
||||
|
||||
def test_template(self):
|
||||
"""Test setting the state with a template."""
|
||||
data = command_line.CommandSensorData('echo 10')
|
||||
data = command_line.CommandSensorData(self.hass, 'echo 10')
|
||||
|
||||
entity = command_line.CommandBinarySensor(
|
||||
self.hass, data, 'test', None, '1.0', '0',
|
||||
@@ -64,7 +64,7 @@ class TestCommandSensorBinarySensor(unittest.TestCase):
|
||||
|
||||
def test_sensor_off(self):
|
||||
"""Test setting the state with a template."""
|
||||
data = command_line.CommandSensorData('echo 0')
|
||||
data = command_line.CommandSensorData(self.hass, 'echo 0')
|
||||
|
||||
entity = command_line.CommandBinarySensor(
|
||||
self.hass, data, 'test', None, '1', '0', None)
|
||||
|
||||
Reference in new issue
Block a user