'"Test template string.'

def test_template_string(self):

    assert setup_component(self.hass, automation.DOMAIN, {automation.DOMAIN: {'trigger': {'platform': 'numeric_state', 'entity_id': 'test.entity', 'value_template': '{{    state.attributes.test_attribute    |    multiply(10)    }}', 'below': 10}, 'action': {'service': 'test.automation', 'data_template': {'some': ('{{    trigger.%s    }}' % '}}    -    {{    trigger.'.join(('platform', 'entity_id', 'below', 'above', 'from_state.state', 'to_state.state')))}}}})
    self.hass.states.set('test.entity', 'test    state    1', {'test_attribute': '1.2'})
    self.hass.block_till_done()
    self.hass.states.set('test.entity', 'test    state    2', {'test_attribute': '0.9'})
    self.hass.block_till_done()
    self.assertEqual(1, len(self.calls))
    self.assertEqual('numeric_state    -    test.entity    -    10.0    -    None    -    test    state    1    -    test    state    2', self.calls[0].data['some'])
