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:
Marcus Schmidt authored and Pascal Vizeli committed 2017-08-10 18:52:52 +02:00
1 parent c0663bf722
commit d7e8616651
4 files changed
+59 -12

No files matched your search

@@ -46,7 +46,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
value_template = config.get(CONF_VALUE_TEMPLATE)
if value_template is not None:
value_template.hass = hass
data = CommandSensorData(command)
data = CommandSensorData(hass, command)
add_devices([CommandBinarySensor(
hass, data, name, device_class, payload_on, payload_off,