'Test setting the state with a template.'

def test_template(self):

    data = command_line.CommandSensorData('echo    10')
    entity = command_line.CommandBinarySensor(self.hass, data, 'test', None, '1.0', '0', template.Template('{{    value    |    multiply(0.1)    }}', self.hass))
    entity.update()
    self.assertEqual(STATE_ON, entity.state)
