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:
parent
c0663bf722
commit
d7e8616651
4 changed files with 59 additions and 12 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue